SPC and TAB are supposed to be valid only within a PRINT statement, correct?
and PC-BASIC variables are not supposed to duplicate any keywords, correct?
10 print "|";spc(4);"|" ' this works as expected
20 print spc ' this prints "0", shouldn't it be a syntax error?
Same thing happens with TAB
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Both statements are correct, but the keywords in this case are SPC( and TAB(, including the opening bracket. Therefore, SPC and TAB are in fact valid variable names, so long as they are not immediately followed by a (.
These are the only keywords that include a bracket, although some keywords include a $.
Last edit: Rob Hagemans 2016-12-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "[CLOSED] Bug reports" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
SPC and TAB are supposed to be valid only within a PRINT statement, correct?
and PC-BASIC variables are not supposed to duplicate any keywords, correct?
10 print "|";spc(4);"|" ' this works as expected
20 print spc ' this prints "0", shouldn't it be a syntax error?
Same thing happens with TAB
Both statements are correct, but the keywords in this case are
SPC(
andTAB(
, including the opening bracket. Therefore,SPC
andTAB
are in fact valid variable names, so long as they are not immediately followed by a(
.These are the only keywords that include a bracket, although some keywords include a
$
.Last edit: Rob Hagemans 2016-12-29