Some Things to Note about Entering Code
- The editor is completely free format. The syntax will be checked as you enter the command. A red triangle beside a command indicates that a warning or error message can be displayed. To display the message, click on the red triangle.
- Your commands and their parameters can be in uppercase or lowercase or mixed case.
Commands
- You can only enter one command per line.
- You cannot have any leading blanks before a command.
- A command may have no parameters (as in END_COM) or may have many parameters (as in BEGIN_COM).
- The definitions of the components (that is, buttons, fields and so on) on your form are stored at the start of your program as a series of DEFINE_COM (Define Component) commands. These commands can be hidden or displayed using the plus sign in front of them or using the editor settings.
- Normally, you will change the DEFINE_COM commands only by using the form layout or by altering the component's property sheet even though you can edit the DEFINE_COM statements.
Parameters
- Many command parameters are optional.
- Parameters may have one or more values (as in ROLE(*EXTENDS #PRIMFORM)). A blank space is used to separate values in a list.
- When coding parameters, do not leave a space between the parameter keyword and the opening bracket. For example, OPTIONS(*DIRECT) or OPTIONS( *DIRECT ) are correct, but
OPTIONS (*DIRECT) is not correct.
- When parameters have default values, the parameters are not explicitly shown in the command, but they can be viewed in the Command Assistant tab. Select the line of code and use F4 to display the Command Assistant tab. It is often convenient to float and resize this tab so that the command parameters can be seen more easily.
Comments
- Comment lines start with an asterisk (*).
- A command line can also have a comment in this format COMMAND /* comment */
- Comment or uncomment a single or block of lines using the short cut keys CTRL+W and CTRL+Shift+W.