Syntax Explanation: Difference between revisions
Jump to navigation
Jump to search
Gordon.dye (talk | contribs) (wording changes) |
|||
Line 3: | Line 3: | ||
;The non-diagrammed syntax conventions are as follows: | ;The non-diagrammed syntax conventions are as follows: | ||
*Uppercase words are BR keywords that | *Uppercase words are required BR keywords that may be acceptable [[abbreviation]]s. | ||
*Items in [square brackets] are optional. | *Items in [square brackets] are optional. | ||
*Items in {braces} can be repeated 0 or more times. | *Items in {braces} can be repeated 0 or more times. | ||
*Terms in <angle brackets> must be replaced with appropriate items. When not inherently logical i.e. <#file number>, item descriptions are found in subsequent lines. | *Terms in <angle brackets> must be replaced with appropriate items. When not inherently logical i.e. <#file number>, item descriptions are found in subsequent lines. | ||
* | *Punctuation must be used, i.e. quotation marks, commas, colons etc. | ||
*Spaces between items mean one | *Spaces between items mean one or more space is required. | ||
*A bar | signifies OR, meaning the item preceding the bar can be replaced with the item following it | *Additional spaces may be specified ahead of or following commas. | ||
*A bar | signifies OR, meaning the item preceding the bar can be replaced with the item following it. For example: | |||
blue black|grey|white red pink|orange | blue black|grey|white red pink|orange |
Revision as of 00:22, 18 April 2014
Each page contains both syntax notation and a diagram.
- The non-diagrammed syntax conventions are as follows
- Uppercase words are required BR keywords that may be acceptable abbreviations.
- Items in [square brackets] are optional.
- Items in {braces} can be repeated 0 or more times.
- Terms in <angle brackets> must be replaced with appropriate items. When not inherently logical i.e. <#file number>, item descriptions are found in subsequent lines.
- Punctuation must be used, i.e. quotation marks, commas, colons etc.
- Spaces between items mean one or more space is required.
- Additional spaces may be specified ahead of or following commas.
- A bar | signifies OR, meaning the item preceding the bar can be replaced with the item following it. For example:
blue black|grey|white red pink|orange
Satisfactory outcomes would be:
blue black red pink blue grey red orange blue white red pink etc...
- All program lines require a line number (although it's not included in syntax notation).
Example: Delete Statement
DELETE #<file number>[,REC=<numeric expression>|,KEY=<string expression>][,RESERVE|,RELEASE] : {<error condition> <line ref>[,]}
numeric expression <conditional expression>|<number>|<numeric variable>|<numeric internal function>|<numeric user-defined function> conditional expression <number> <numeric operator> <number> <numeric expression> <numeric operator> <numeric expression> <numeric expression> <numeric operator> <numeric expression>{AND <numeric expression> <numeric operator> <numeric expression} {OR <numeric expression> <numeric operator> <numeric expression>} <value> <comparison operator> <value> <value><comparison operator><value> {AND <value><comparison operator><value>} {OR <value><comparison operator><value>} {NOT <value><comparison operator><value>} number <A rational number up to 15 digits long>. See RD in BRConfig.sys. numeric variable <1-30 alphanumeric characters and underscores, the first of which must be a letter (but not FN). They also cannot be reserved words> numeric internal function <An internal function with a numeric value> numeric user-defined function <One with a numeric value>
string expression <string internal function>|<string user-defined function>|<string constant>|<string variable> {<substring operations>} {<concatenation operations>} string internal function <An internal function with a string value> string user-defined function <One with a string value> string constant <"a series of characters enclosed in quotation marks"> string variable <1-30 alphanumeric characters and underscores, the first of which must be a letter (but not FN) which ends in a $. They also cannot be reserved words>