Script-IV Language
This manual provides information on the Script-IV language. This section contains information on logical conditionals, reserved keywords, and the syntax conventions used in this manual. The next section provides complete descriptions of Script-IV language elements. The next section also lists the Thoroughbred Basic directives, functions, and system variables that can be included in scripts.
Operating System Support: UNIX, Linux, and Windows
For specific information, please contact your Thoroughbred Sales Representative.
Information and Organization
Section titled “Information and Organization”Script-IV commands and variables are alphabetically ordered. The description of each command or variable is organized by the following topics:
- FUNCTION
- Describes the action or purpose of each command or variable.
- SYNTAX
- Provides an outline of command or variable structure. Parameters and options are listed and described following the structural outline.
- NOTES
- Remarks and important information on command or variable syntax and the function of the command or variable in a script.
- EXAMPLES
- Typical examples of command or variable usage.
- SEE ALSO
- Cross-reference to related commands or variables.
- Where there
- is more than one form of a command, the beginning of each command is shown in boldface
letters and a blank line separates each form of the command. In some cases, different forms of commands are described in separate sections, for example, PRINT HELP and PRINT MESSAGE.
As long as the elements within a command are separated by spaces and fall within the procedure section of a script, no indention is required. For readability, the syntax is represented with standard indention to highlight clauses and options under each command.
- Note:
- For more examples of Script-IV commands, declarations, and variables, please refer to the section on Sample Scripts in the Script-IV Developer Guide.
Logical Conditionals
Section titled “Logical Conditionals”A logical condition is two or more values, consisting of constants, data names, variables, functions, or expressions that interact with relational or logical operators to form either a true or false result.
Relational operators in conditions
Section titled “Relational operators in conditions”| = | equal to |
| > | greater than |
| < | less than |
| >= or => | greater than or equal to |
| <= or =< | less than or equal to |
| <> or >< | not equal to |
| ( ) | Grouping |
Special operators in conditions
Section titled “Special operators in conditions”- =ALL string-value
- Used to determine whether a string of any length contains repetitions of just one character. The first character of the string-value is used in the comparison. For example, IF STRING_VALUE$ =ALL "A" is true if STRING$_VALUE contains only "A" characters.
- LIKE "partial-value"
-
Partial equality. The LIKE operator can specify a string value that contains wildcards, which can match more than one character. The LIKE operator automatically pads its values to the correct length.
LIKE wildcards
- matches any string of characters (0 or more).
- ?
- matches any single character.
- [A-Z]
- matches a range for a single character.
- [AGCF]
- matches a single character in a list.
- [wildcard]
- matches the specified wildcard character.
The [ and ] characters in wildcards are required. The * and ? wildcards perform case-insensitive comparisons.
Logical operators in conditions
Section titled “Logical operators in conditions”- AND
- logical AND (both true)
- OR
- logical OR (either true)
Reserved Words
Section titled “Reserved Words”You cannot use a reserved word as a data name or procedure name in a script. All Script-IV keywords are reserved words, as are all Thoroughbred Basic function names and system variable names, and some Thoroughbred Basic directive names.
| The following list | includes many of the | words reserved by Script-IV: | |
|---|---|---|---|
| ABS | ACS | ADD | ALL |
| AND | ARE | ASC | ASN |
| ATH | ATN | ATQ | BIN |
| BORDER | BREAK | BSZ | BUSY |
| BY | CALL | CHANGE | CHANGING |
| CHARACTERS | CHR | CLEAR | CLOSE |
| COLUMN | CONTINUE | COS | CPL |
| CRC | CTL | DATA | DATA-NAME |
| DAY | DEC | DELETE | DEPENDING |
| DIM | DIRECTIVE | DN | DO |
| DSD | DSZ | DUPLICATE | ELSE |
| END | ENDIF | ENDLOOP | ENDTRACE |
| ENTER | EPT | ERR | ERROR |
| ESCAPE-KEY | EXP | FID | FIELD |
| FILE-SUFFIX | FIRST | FKY | FN |
| FORMULAS | FPT | FROM | FUNCTION |
| GAP | HEADING | HELP | HSA |
| HSH | HTA | IF | INCLUDE |
| IND | INPUT | INT | INTO |
| IOR | IS | KEY | LA |
| LAST | LEN | LENGTH | LET |
| LINE | LINES | LIST | LKY |
| LN | LOG | LRC | LST |
| MENU-PARMS | MESSAGE | MISSING | MOD |
| NEXT | NLG | NOT | NUM |
| NUMBER | OFF | ON | OPEN |
| OVERLAY | PAUSE | PCK | PER-LINE |
| PGM | PGN | PKY | POS |
| POST | POST-HELP | PRE | PREVIOUS |
| PRINTER | PROCESS | PROCESSES | |
| PROCESSING | PSZ | PUB | PUBLIC |
| RANGE | READ | RECEIVE | RECORD |
| RESUME | RETRY | REVERSE | RND |
| RUN | SCREEN | SELECT | SEND |
| SET | SETTRACE | SGN | SIN |
| SN | SORT | SQR | SSN |
| SSZ | STR | SYS | SYSTEM-DATE |
| SYSTEM-TIME | TAN | TCB | TERM-KEY |
| TERMINAL-TIME | TERMINATE | TEXT | TEXT-END |
| THEN | TIM | TIMES | TO |
| TSK | TSM | TYPE | UNLOCK |
| UNTIL | UPDATE | UPK | USING |
| VN | WAIT | WHEN | WHILE |
| WINDOW | XOR |
Syntax Conventions
Section titled “Syntax Conventions”The following conventions have been used to describe the syntax of the Script-IV commands:
- CAPITALS
- Words in boldface CAPITALS mark the beginning of a command.
- CAPITALS
- Words in CAPITAL letters are keywords and must be entered as shown.
- CAPITALS
- Words in italic CAPITALS are optional for script readability and have no effect on command syntax.
- [optional]
- Elements contained in [square brackets] are optional syntactic elements.
- lower case
- Elements shown in lower case letters identify parameters that need further information or items to be supplied by the user.
- lower-case
- Words in underscored lower case letters indicate a more detailed explanation of a parameter.
- ...
- An ellipsis indicates that the preceding element can be repeated.
- |
- The vertical bar indicates that the user has a choice between two or more elements. At least one of the entries must be chosen unless the complete set of elements is enclosed in square brackets.
- "value"
- A value enclosed in quotation marks indicates a string value.
- Punctuation and symbols
- With the exception of the above symbols, all punctuation or relational symbols shown within a command format, such as commas, parentheses, semicolons, equal signs, and so on, are part of the syntax and must be included where shown.
From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF