![]() |
Simply KoolB: Commands[Overview | Under the Hood | Commands | IDE | FAQ | Credits | www.BrianCBecker.com] |
![]() |
The Simply KoolB compiler supports 7 commands. These commands are mainly BASIC-like commands, so if you are familiar with BASIC, you will be right at home with Simply KoolB. Simply KoolB is line based, which means that you will need to put one command per line. Also, the commands are not case-sensitive, meaning you can use PRINT , print , or PrInT . To the compiler, it is all the same.
Blank Line Although technically not a command, this command is quite useful. You can make code much easier to read by spacing commands out. REM Tells the compiler to ignore any text on the rest of the line. REM is short for REMARK. It allows you to make comments about other code. For example: REM I can type whatever I want here and it will be ignored
CLS Clears the screen by erasing all text. This command is used all by itself. For example: CLS
PRINT "STRING" Prints a single string on the screen. Anything between the double quotation marks will be printed. Some examples include: PRINT "Hello World!"
PRINT "My name is Brian C. Becker, how about yours?"
RUN "COMMAND" Runs a system command, such as "DIR" or "ls" or "notepad." What you can run depends on the operating system. For instance, running "ls" on Windows would not work! Examples include: REM On Windows:
REM On Linux:
SLEEP 1 Pauses the program for a number of seconds. The number of seconds must be a positive integer. For example: SLEEP .5 <--Will NOT work!
SLEEP 3 <--But this works
WAIT Pauses the program until the user presses ENTER. This can be useful in printing out only a page of text at a time. For example: PRINT "Blah, blah, blah"
|
|