Using 040, console.inc.
This works:
print "limit: " & limit & " tmp: " & tmp & " mod(tmp, limit): " & mod(tmp, limit) & cr
But this won't compile.
print "limit: " limit " tmp: " tmp " mod(tmp, limit): " mod(tmp, limit) cr
Gives:
ERROR: unexpected comma in array index
WORD: tmp
IN: rnd
LINE: 366
FILE: "main source"
This (leaving out the mod()) works:
print "limit: " limit " tmp: " tmp " mod(tmp, limit): " cr
Is it better to always use "&" when concatenating things?
Put the whole print expression between brackets, including the cr. The cr must be part of the expression
Quote from: Charles Pegge on July 19, 2022, 03:31:02 PM
Put the whole print expression between brackets, including the cr. The cr must be part of the expression
I tried:
print("limit: " limit " tmp: " tmp " mod(tmp, limit): " mod(tmp, limit) cr)
And got:
ERROR: unexpected comma in array index
WORD: tmp
IN: rnd
LINE: 366
FILE: "main source"
But this is no biggie, as the "&" version works fine.
By the way, I really, really appreciate the "-m" switch!