intel MCS BASIC-52 — Intel MCS BASIC-52 Versions 1 & 1.1 Operating and Reference Manual PDF

int e l 4.28 DESCRIPTION OF STATEMENTS STATEMENT: REM MODE: RUN (Version 1.0) COMMAND AND/OR RUN (Version 1.1) TYPE: CONTROL -- PERFORMS NO OPERATION REM is short for REMark. It does nothing, but allows the user to add comments to a program. Comments are usually needed to make a program a little easier to understand. Once a REM statement appears on a line the entire line is assumed to be a remark, so a REM statement may not be terminated by a colon (:) however, it may be placed after a colon. This can be used to allow the programmer to place a comment on each line. EXAMPLES:

>10 REM INPUT ONE VARIABLE >20 INPUT A >30 REM INPUT ANOTHER VARIA3LE >40 INPUT B >50 REM MULTIPLY THE TWO >60 Z=A*B >70 REM PRINT THE ANSWER >80 PRINT Z >10 INPUT A : REM INPUT ONE VARIABLE >20 INPUT B : REM INPUT ANOTHER VARIABLE >30 Z=A*B : REM MULTIPLY THE TWO >40 PRINT Z : REM PRINT THE ANSWER The following will NOT work because the entire line would be interpreted as a REMark, so the PRINT statement would not be executed: >10 REM PRINT THE NUMBER :

PRINT A NOTE -- The reason the REM statement was made executable in the command mode in Version 1.1 of MCS BASIC-52 is that if the user is employing some type of UPLOAD/DOWNLOAD routine with a computer, this lets the user insert REM statements, without line numbers in the text and not download them to the MCS BASIC-52 device. This helps to conserve memory. - 63 -