Qbasicnews.com

Full Version: comments
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
ok, i have done a search in qbasicnews on this subject but came up with nothing ..can you put comments in a qbasic program and how ????
thanx in advance Big Grin
Using the keyword REM or using the character '

Eg:

Code:
REM This is my QB program!
' Hey another way to comment!
great thanx
oh, one more thing does it matter were the comment goes like above the code on the side???

Anonymous

the only thing that you have think about is programs are divided into lines. so everything after a ' or a REM on THE SAME LINE will be a comment.

on the next line, execution resumes normally

and no, doesnt matter where they are
In general, if the comment fits at the end of the line, place it there.
If you comment many lines in this fashion, try to line up all these comments so that the all begin at the same position (column).

If you need to provide a lengthy description that will occupy more than one line, then put these comment lines in front of the code.

Remember, comments are usually intended to be read primarily by the author of the program to remind him of what he was doing. The other purpose is to guide another programmer in the future maintenance of the program.

Don't comment the obvious:
Code:
X = X+1             'Add 1 to X
*****
great, thanx for all your help...
wow,what a bummer running qb on my floppy and my cpu is running at 1 hundred percent not good , not good at all ... Sad
DOS programs use 100% CPU

It doesent affect anything..
THAT A LIE Z!IRE.

Whenever i run qbasic 4.5 off a floppy or ipod or whatever, the comuter runs a slow as hell (thats on a windows 98 )
Well, on 9x the problem is because of floppy acess and crappy buffering.

There's no problem on a 2k machine.

XP has the DOS VM set to 100% for some weird reason, you can lower it if you like.
Pages: 1 2