Recital 4GL Basics

From Recital Documentation Wiki
Revision as of 15:04, 24 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Commands

Recital 4GL commands can be entered in a free-form fashion. Spaces and indents can be added where required to make the code more readable. Commands can be entered in upper, lower or mixed case and in almost all instances, only the first four letters of a command need be entered, e.g.

MODIFY STRUCTURE
MODI STRU
SET EXCLUSIVE ON
SET EXCL ON


Comments

Comments are ignored by the compiler but are, of course, very useful to the developer and even more so to anyone who has to maintain or alter the code later in its lifetime.


Symbol Position Effect
* Start of line Line is ignored
NOTE Start of line Line is ignored
// Anywhere in line All text that follows is ignored
&& Anywhere in line All text that follows is ignored
/*...*/ /* at start of line, */ at end of that or subsequent line All text between the delimiters is ignored


Line Continuation

The semi-colon ";" placed at the end of a line can be used to continue a command onto the next line. Commands can be up to 8192 characters long.

use customer;
in 1;
order customer

Is the equivalent of:

use customer in 1 order customer


Multiple Commands

By contrast, a semi-colon ";" within a line signifies the end of a command and that the text that follows is a new command.

select 1; use customer; set order tag customer

Is the equivalent of:

select 1
use customer
set order tag customer