You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Show Contents List
You are here: Visual LANSA User Guide > 3. Standard Editor Tabs > 3.20 Source Tab > 3.20.1 Rules for the Editor

3.20.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 (star).
  • 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.20 Source Tab
Show Contents List

  • No labels