Posts: 2,698
Threads: 327
Joined: Apr 2022
Reputation:
217
10 NOT 10... I can see why that's an error. There's no operators there between the first 1 and NOT.
Make that 10 * NOT 10, and all is good.
Posts: 13
Threads: 1
Joined: May 2024
Reputation:
3
T NOT T should not be allowed. NOT is unary operator, like making a number negative.
the problem is somebody could write T -3 then compiler picks it up as T - 3. so why can't NOT work the same way, programmer asks? because NOT was designed to work with one integer at a time.
programmer asks if he doesn't use the ide. try to type T -3 in ide and it puts space between minus and 3.
new _NEGATE cause more confusion. is it only supposed to be used in IF statement?
do not load compilelog.txt into ide. creates very strange characters which should be utf-8, for fancy single-quote. this is just a disgusting thing g++ does.
Posts: 2,698
Threads: 327
Joined: Apr 2022
Reputation:
217
As I wrote earlier in the topic here, the issue is a lack of operators between the number and the function.
Would any of the following make sense to anyone?
10 ABS(10)
10 SIN(10)
10 LOG(10)
10 _PRINTWIDTH("10")
If that first 10 is a line number, then.... they're all still wrong as ABS(10) does nothing by itself. It's not assigned as a value to a variable or array. It's not being sent into any function. It's just doing what exactly??
Now, if that 10 is supposed to be part of some math function, exactly what is the computer supossed to do? Automatic multiplication? I'm afraid that's not a syntax that BASIC recognizes.
All the above are errors, and are obvious errors which the IDE catches and flags for you.
10 NOT 10, is the exact same type of thing, but it currently slips past the built-in error catching. It's nothing more than a glitch that simply isn't caught and flagged by the IDE, which causes the g++ compiler to point it out once it gets to it instead.
There's no mystery as to what's going on here. It's just an error that g++ is catching instead of the qb64 IDE.