How to disable SuperStrict in BlitzMax NG?

Started by sphinx, June 17, 2019, 20:02:22

Previous topic - Next topic

sphinx

Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Steve Elliott

Why would you ever want to do that?!   :P
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Derron

NG is by default STRICT not SUPERSTRICT.

No way to disable it - it's just what the compiler expects.

Also I cannot come up with a valid reason requiring disabling "strict".


bye
Ron

Dabz

Quote
Why would you ever want to do that?!

I'm guessing porting code over, disabling it will mean it'll be a lot easier to get stuff building.

But if your starting code from fresh, then, yeah, strict/superscrict should be left, makes stuff a lot cleaner.

Dabz
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Derron

For porting (from "non strict vanilla code" to "ng") there is "strict" which gets rid of the most annoyancies "non superstrict"-users feel.

There seems to be a time at which bad habbits strike back and want to kill the time you saved in the past not writing (super)strict code.


But let's see what the OP has for reasons - maybe there are even better arguments.


bye
Ron

sphinx

#5
Thanks all for your replies.

Indeed, I have an old BlitzMax game which is working just fine, but gives many errors with NG.
I was away for a long time doing serious Apps for my company and started to live my dream again for making new games.
I thought why not port my PC game to MacOS and Linux and get some cash from Itcho.com or whatever.

I have hard times running old BlitzMax IDE in Linux and MacOS, NG is a lot easier to install and run but comes with a cost which I mentioned earlier.

On MacOS (Mojave) and with classic BlitzMax I get 'library not found for -lstdc++' when trying to compile, on Linux (Ubuntu) I get much more errors!
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

sphinx

#6
I get the error "Syntax error - expecting ')'" on the following line :

DrawImage HDigBlock, Player.x / 24 * 24, Player.y / 24 * 24, Worldtheme * 6 + DigFrame

Any clue?
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Derron

Can you show the surrounding block of code? Assume NG reports the wrong erroneous line number.


Bye
Ron

sphinx

Quote from: Derron on June 18, 2019, 07:02:02
Can you show the surrounding block of code? Assume NG reports the wrong erroneous line number.


Bye
Ron
Thanks, I figured out that Arrays in NG must use [] instead of () which causes that problem because I forgot to change one bracket!!

Well, NG looks like a nightmare to me right now :(
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Derron

Vanilla allowed round brackets "(" and ")" for arrays? really?


@ nightmare
First of all (during conversion) you should tick the right boxes in MaxIDE: "Program" -> "Build options" -> "Overload warnings"
Else you will have to take care of some more stuff.

Some BMK params would even allow for "compatibility":
bmk -w -nostrictupgrade


Maybe we should add these options to MaxIDE too.

sphinx

Quote from: Derron on June 18, 2019, 07:28:42
Vanilla allowed round brackets "(" and ")" for arrays? really?

Well, the game was originally a BlitzBasic project which I converted to BlitzMax and if I recall right I did a work around for old BlitzBasic field types and arrays!

That was a long time ago and now I am like a newbie  :))
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Derron

Sooner or later you climbed the hill and once you got your stuff working you will begin to like the new features NG provides (most probably overloading methods and "new()" with parameters).


bye
Ron

sphinx

Quote from: Derron on June 18, 2019, 08:05:32
Sooner or later you climbed the hill and once you got your stuff working you will begin to like the new features NG provides (most probably overloading methods and "new()" with parameters).


bye
Ron
I hope so!
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com