27

Here's a blast from the past: what does "REM", the comment marker, stand for in BASIC? What's the origin of this non-obvious term?

jes5199
  • 18,324
  • 12
  • 36
  • 40

5 Answers5

56

I believe it stands for "Remark", that is, a comment. From the MSDN site:

Used to include explanatory remarks in the source code of a program.

Chris Bunch
  • 87,773
  • 37
  • 126
  • 127
  • 7
    confirmed. it's for REMark. I had it on my BASICv2 C64 manual, and since I was like 6 yo at that time, things got stuck in my head pretty well. – Stefano Borini Aug 19 '09 at 02:13
  • 4
    that's not true. everybody know the real answer is 42. – Stefano Borini Aug 19 '09 at 02:19
  • 2
    Confirmed again from the "Commodore 128 Personal Computer System Guide", first published in 1985, section 3.2.5 Rules for Typing BASIC Language Programs, bullet #7: The computer ignores anything following the letters REM on a program line. REM stands for REMark. You can use the REM statement to put comments in you program that tell anyone listing the program what is happening at a specific point. (http://www.commodore.ca/text/c128_1-15.txt) – Scott Dorman Aug 19 '09 at 02:19
  • 1
    Found an earlier reference, 1979 also from Commodore in the "Commodore PET 2001 Quick Reference", top of page 8 in the PDF. (http://www.commodore.ca/manuals/commodore_pet_2001_quick_reference.pdf) – Scott Dorman Aug 19 '09 at 02:27
  • 5
    I'll take this back a step further. The Dartmouth BASIC manual from 1964 states "An important part of any computer program is the description of what it does, and what data should be supplied. This description is commonly called documentation. One of the ways a computer program can be documented is by supplying **remarks** along with the program itself. BASIC provides for this capability with the **REM** statement." (http://www.bitsavers.org/pdf/dartmouth/BASIC_Oct64.pdf) – D.Shawley Aug 19 '09 at 03:11
8

It was REMark, back in the late Steam Age (ca. 1971 or so), when I first encountered BASIC.

Most approachable book I've ever found on the language was "My Computer Likes Me (When I Speak In BASIC)", or something like that.

For extra credit and mondo greybeard rep points: BASIC is an acronym (maybe a backronym, but whatever), for Beginner's All-purpose Symbolic Instruction Code.

I hated BASIC when I first ran into it, because I learned FORTRAN IV first, and BASIC seemed incredibly primitive. It was a long time before I got comfortable with the idea that BASIC was actually a lot easier to use for the kind of casual numbercrunching it was designed to do.

John R. Strohm
  • 7,547
  • 2
  • 28
  • 33
5

It's an abbreviation for "remark", valid only at the beginning of the line (unlike vb.net), after the line number (if any).

xpda
  • 15,585
  • 8
  • 51
  • 82
  • Everything after the first comma is true for a specific BASIC implementation you don't specify. In all BASIC dialects I know of, that allow more than one statement per line, a REM can be preceded by other statements. – BlackJack Jun 25 '22 at 10:40
0

In some dialects of QBasic the following is true:

REM $STATIC
or
' $STATIC

REM $DYNAMIC
or
' $DYNAMIC

$DYNAMIC sets aside storage for arrays while the program is running.
$STATIC sets aside storage for arrays during compilation.

REM $INCLUDE: 'filespec'
      or
' $INCLUDE: 'filespec'

 filespec    The name of a BASIC program file, which can include a
             path. Use single quotation marks around filespec.
eoredson
  • 1,167
  • 2
  • 14
  • 29
-1

I always thought of it as "reminder", myself, but Chris Bunch is probably right - "remark" seems more likely.

EMP
  • 59,148
  • 53
  • 164
  • 220
  • 2
    I thought it was "REMember". Don't know why, I guess because I was about 8 when learning it and that was the first thing that popped into my head. – Jeremy Logan Sep 08 '09 at 10:50
  • In some Basic dialects REM required a space, then the remark. in some, it did not so you could say REMARKABLE program here: – eoredson Aug 27 '16 at 07:22
  • Some Basics also used meta-commands such as REM $DYNAMIC or REM $STATIC – eoredson Aug 27 '16 at 07:24