PureBasic programs are made from at least one source file containing instructions which are executed in sequence unless your source code changes the flow.
Instructions are usually one per line, although you can have multiple instructions separated by colon characters. You can never spread an instruction over multiple lines.
Keywords are part of the language and do not have parentheses. Keywords are only similar to each other.
Commands are stored in libraries, always follow the same format and always have parentheses after the command name. You put the parameters inside the parentheses, separated by commas. Some commands also return values back to your source code.
Comments are started using the semi-colon character. Strings are enclosed within inverted commas (the " character) and numbers are typed as you would write them (numerically).
The commands OpenConsole and CloseConsole allow you to open and close a console window which can be used to display text using the PrintN command.
The Input command can be used to pause the display until the user presses return, giving them a chance to read the output of your program.
| Previous topic | Chapter contents | Next topic |
|---|---|---|
| Breakdown and explanation of the program | User Guide contents | None |