3 8 1 Rules for the Editor

Visual LANSA

3.8.1 Rules for the Editor

Following are the general rules for code syntax in LANSA:

  • The object type determines the structure of the source code.
  • The object type determines the commands allowed.
  • You can enter one statement or command per line.
  • The first character of a command line must not be blank.
  • Blank characters are not allowed between a parameter name and its first bracket.
    For example, FUNCTION OPTIONS( *DIRECT ) is correct. FUNCTION OPTIONS ( *DIRECT ) is incorrect and will be flagged as an error.
  • The editor is not case sensitive.
  • You do not need to end statements with a semicolon.
  • To comment out a line, use an asterisk (*).
  • A comment line in RDMLX code can be up 2048 bytes in length.   The limit of 55 characters still applies for RDML code.
  • The syntax of the commands is checked as you type.
  • You cannot have blank lines in an RDML function, but blank lines are allowed in RDMLX code.

 

For Visual LANSA components note that:

  • A component definition must be enclosed inside BEGIN_COM and END_COM statements.
  • With the exception of DEFINE_MAP, all definition statements must be placed before event routines. This means that DEFINE_COM, DEFINE_EVT and DEFINE_PTY statements are always defined in the beginning of the component. DEFINE_MAP must either follow the DEFINE_EVT statement it belongs to or it has to be placed inside a PTYROUTINE or a MTHROUTINE statement.
  • All code, except for definition statements, must be written inside an event routine or a subroutine.

Ý 3.8 Source Tab