Difference between revisions of "Recital 4GL Basics"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | ==Commands== | |
− | Recital | + | 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. |
<code lang="recital"> | <code lang="recital"> | ||
Line 17: | Line 17: | ||
!Symbol||Position||Effect | !Symbol||Position||Effect | ||
|- | |- | ||
− | |*||Start of line||Line is ignored | + | |[[*]]||Start of line||Line is ignored |
+ | |- | ||
+ | |[[NOTE]]||Start of line||Line is ignored | ||
|- | |- | ||
− | |//||Anywhere in line||All text that follows is ignored | + | |[[Double Slash Comment|//]]||Anywhere in line||All text that follows is ignored |
|- | |- | ||
− | |&&||Anywhere in line||All text that follows is ignored | + | |[[&&]]||Anywhere in line||All text that follows is ignored |
|- | |- | ||
+ | |[[Comment Block|/*...*/]]||/* at start of line, */ at end of that or subsequent line||All text between the delimiters is ignored | ||
|} | |} | ||
==Line Continuation== | ==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. | + | 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. |
<code lang="recital"> | <code lang="recital"> | ||
Line 43: | Line 46: | ||
==Multiple Commands== | ==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. | + | By contrast, a semi-colon "[[;]]" within a line signifies the end of a command and that the text that follows is a new command. |
<code lang="recital"> | <code lang="recital"> |
Latest revision as of 15:04, 24 March 2009
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