July 21, 2019, 10:53:33 AM

Author Topic: How to disable SuperStrict in BlitzMax NG?  (Read 267 times)

Offline sphinx

  • Full Member
  • ***
  • Posts: 206
    • Ancientsoft
How to disable SuperStrict in BlitzMax NG?
« on: June 17, 2019, 08:02:22 PM »
Your help is much appreciated!
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 1840
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #1 on: June 17, 2019, 08:25:45 PM »
Why would you ever want to do that?!   :P
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline Derron

  • Hero Member
  • *****
  • Posts: 2218
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #2 on: June 17, 2019, 09:50:47 PM »
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

Offline Dabz

  • Full Member
  • ***
  • Posts: 180
  • Is it cos I is ginger?
    • dabzy.co.uk
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #3 on: June 17, 2019, 09:54:41 PM »
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), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Offline Derron

  • Hero Member
  • *****
  • Posts: 2218
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #4 on: June 17, 2019, 10:18:04 PM »
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

Offline sphinx

  • Full Member
  • ***
  • Posts: 206
    • Ancientsoft
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #5 on: June 18, 2019, 04:06:03 AM »
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

Offline sphinx

  • Full Member
  • ***
  • Posts: 206
    • Ancientsoft
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #6 on: June 18, 2019, 06:44:39 AM »
I get the error "Syntax error - expecting ')'" on the following line :

Code: [Select]
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

Offline Derron

  • Hero Member
  • *****
  • Posts: 2218
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #7 on: June 18, 2019, 07:02:02 AM »
Can you show the surrounding block of code? Assume NG reports the wrong erroneous line number.


Bye
Ron

Offline sphinx

  • Full Member
  • ***
  • Posts: 206
    • Ancientsoft
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #8 on: June 18, 2019, 07:08:35 AM »
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

Offline Derron

  • Hero Member
  • *****
  • Posts: 2218
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #9 on: June 18, 2019, 07:28:42 AM »
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.

Offline sphinx

  • Full Member
  • ***
  • Posts: 206
    • Ancientsoft
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #10 on: June 18, 2019, 07:44:23 AM »
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

Offline Derron

  • Hero Member
  • *****
  • Posts: 2218
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #11 on: June 18, 2019, 08:05:32 AM »
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

Offline sphinx

  • Full Member
  • ***
  • Posts: 206
    • Ancientsoft
Re: How to disable SuperStrict in BlitzMax NG?
« Reply #12 on: June 18, 2019, 08:45:43 AM »
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