Game: various *mites: Four Equals Ten
Author
Message
JohnS
Guru
Joined: 18/11/2011
Location: United KingdomPosts: 4344
Posted: 06:39pm 13 Jan 2023
matherp said
Quote
IF a = 1 THEN b = 0 : c = 0 : PRINT "test complete"
Personally I hate this syntax as it breaks any common sense rules within Basic (and certainly doesn't work in C)
If : is essentially the equivalent of a end-of-statement/newline how can c=0 be executed as part of the condition?
My advice and practice is always to have either a simple
IF condition THEN onestatement
or the normal IF ENDIF
I'm not keen, either.
In C you can get a rough equivalent if you abuse the comma operator but should I post an example? Maybe not!
John