Programming Syntax
From C64-Wiki
(Redirected from programming syntax)
Jump to navigationJump to searchIn order that a programmer knows what is the right way to use a programming directive without producing an error message, exists a common programming syntax (syntax for description of computer programs). In the scope of the articles describing programming languages like the BASIC keywords of version 2 in the Commodore 64, the programming syntax that was used mostly in the last decades in the computer world is used.
- The actual command is written in capital letters. When typing in a program the command needs to be typed in like printed in the article.
- When there are other characters than [],<>,… like comma, semicolon or colon after a command, they must be typed in.
- When there are square brackets [] after a command the enclosed parameters are optional (may be left out).
- The ellipsis … indicates that the optional parameters may be repeated.
- The pointy brackets <> embrace variable data that may not be left out.
- A slash / or vertical bar | indicates that parameters may be used alternatively.
- Data (parameters, arguments to functions, constants) in quotation marks "…" need to be typed in with quotation marks at this place.
- When there are character strings in curly brackets {} it is used to display control characters as keyboard input. For
PRINT "{wht/white}";
the key combination CTRL and 2 must be pressed.