Liberty BASIC Help Online

REM
 
REM comment
 
Description:
The REM statement is used to place comments inside code to clearly explain the purpose of each section of code.  This is useful to both the programmer who writes the code or to anyone who might later need to modify the program.  Use REM statements liberally.  There is a shorthand way of using REM, which is to use the ' (apostrophe) character in place of the word REM.  This is cleaner to look at, but you can use whichever you prefer.  Unlike other BASIC statements, with REM you cannot add another statement after it on the same line using a colon ( : ) to separate the statements.  The rest of the line becomes part of the REM statement.
 
Usage:
 
  rem  let's pretend that this is a comment for the next line
  print "The mean average is "; meanAverage
Or:
  ' let's pretend that this is a comment for the next line
  print "The strength of the quake was "; magnitude
 
This doesn't work:
 
  rem  thank the user : print "Thank you for using Super Stats!"
    (even the print statement becomes part of the REM statement)
 
Note:
When using ' instead of REM at the end of a line, the statement separator : (colon) is not required to separate the statement on that line from its comment.
 
For example:
 
print "Total dollar value: "; dollarValue : rem  print the dollar value
 
Can also be stated:
 
print "Total dollar value: "; dollarValue  ' print the dollar value
 
Notice that the : (colon) is not required in the second form.
 
 
 
 


Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/