1

I have recently come across the term REM statement and wondered, is it synonymous with comment?

  • 1
    REM is used in Windows batch files for comments. And iirc in some old school BASIC's. – GrandmasterB Mar 10 '17 at 8:14
2

REM is a statement in some older BASIC dialects, like for example in C64 BASIC. It starts a comment line. Even Visual Basic still supports it, even though the preferred syntax for comments in Microsoft dialects of BASIC is a single quote since Quick Basic.

Many people in my generation made their first programming experiments in the 80s on Commodore home computers which used a BASIC interpreter as their default command shell, so the term REM Statement as a synonym for comment might still be engrained in some people. I haven't heard anyone use that term for about 20 years, though.

6

Strictly REM is a REMark and it is very similar to a comment, however in Windows batch files it will be shown to the user unless either ECHO Off has been called earlier in the file or it is preceded by @ as in:

REM This will be shown during execution
@REM This will not!
@ECHO OFF
REM Nor this!

So the answer is nearly but not quite in batch files.

In BASIC it is a comment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.