Classic Computer Magazine Archive COMPUTE! ISSUE 80 / JANUARY 1987 / PAGE 10

readers feedbackReaders' Feedback

The Editors and Readers of COMPUTE!

More About Atari's COM
Just a note regarding the October 1986 installment of "Readers' Feedback," in which Brian Korn asked about using COM as a variable name in Atari BASIC. Your reply correctly states that COM is a reserved word and cannot be used in an implicit variable assignment such as COM=10. However, you can use any reserved word as a variable name by making an explicit assignment with LET. The statement LET COM= 10 assigns the value 10 to the variable COM.
    Implicit assignment (assignment without LET) works in an interesting way. LET is the last keyword in the keyword table, and thus becomes the default. If the interpreter can't find any other keyword at the beginning of a BASIC statement, it assumes you wish to perform an assignment and executes LET. As a result, the statement A=10 has the same effect as LET A=10. You can't assign COM implicitly (without a LET) because the keyword COM comes before LET in the keyword table. BASIC performs DIM in place of COM, and the interpreter never gets a chance to perform LET by default.
S.A. Robinson

Thank you for the clarification. LET does allow you to use any reserved word - GRAPHICS, PRINT, or whatever-as part of a variable name or as the entire name. Though it may be useful on occasion, we don't recommend that you embed keywords in variable names as a regular practice. The potential for confusion is great, and it's often possible to find an equally descriptive name that doesn't involve a keyword. For instance, instead of using COMP to signify COMPUTATION, why not substitute CALC (to signify CALCULATION)?