I,m trying to run older 4.30 code, but now PB doesnt understand BOOL(). This doesn't work: BOOL(Yr % 400 = 0)
Expression is supposed to be false if Year modulo 400 is false, If I just delete BOOL the logic that relied on BOOL
seems to work, at least there are no errors reported.. ?
BOOL() function
- utopiomania
- Addict
- Posts: 1655
- Joined: Tue May 10, 2005 10:00 pm
- Location: Norway
Re: BOOL() function
There was no Bool() in PureBasic 4.30, it was added in PureBasic 5.10
How your old code can have Bool()?
Bool works fine here in PB 6.0
How your old code can have Bool()?
Bool works fine here in PB 6.0
Code: Select all
Debug Bool(Yr % 400 = 0)
1
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: BOOL() function
Also, you don't need the Bool function for that comparison, use simply:
or
Code: Select all
If (Yr % 400)
Code: Select all
If Not (Yr % 400)
- utopiomania
- Addict
- Posts: 1655
- Joined: Tue May 10, 2005 10:00 pm
- Location: Norway
Re: BOOL() function
Thanks ! I didnt even know I wrote something in 5.10 Its strange, almost everytime I run older code on a newer compiler, or
newer code on an older compiler, it ends up in a f*ckin plane chrash with flames and all, and... back to the drawing board
newer code on an older compiler, it ends up in a f*ckin plane chrash with flames and all, and... back to the drawing board