This section contains example programs written in OPL. The programs are not intended to demonstrate all the features of OPL, but they should give you a few hints. To find out more about a particular command or function, see Keyword Reference. There are some other example programs see Advanced Topics.
CLS :PRINT "hello" :GET
However, the colon is optional before a REM statement for example:
CLS REM Clears the screen
and
CLS :REM Clears the screen
are both OK.
The following programs do not include full error handling code. This means that they are shorter and easier to understand, but may fail if, for example, you enter the wrong type of input to a variable.
If you want to develop other programs from these example programs, it is recommended that you add some error handling code to them. See Error Handling for further details.