Recital 4GL Basics

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

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

Recital/4GL statements 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
// Anywhere in line All text that follows is ignored
&& Anywhere in line All text that follows 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