This chapter is divided into two parts:
A discussion of syntax conventions used to describe Thoroughbred Basic directives, functions, and system variables.
A quick reference to all Thoroughbred Basic directives, functions, and system variables. The quick reference is divided into the following categories:
Directives
Numeric functions
String functions
System variables
Entries under each category are alphabetically ordered. Each entry contains the required syntax for the directive, function, or system variable.
Full descriptions of directives, functions, and system variables are contained in the Thoroughbred Basic Language Reference. Most descriptions contain the following information:
PURPOSE
discusses how to use the directive, function, or system variable.
SYNTAX
displays how to type the directive, function, or system variable.
REMARKS
discusses things to remember and the most common errors encountered during execution.
EXAMPLES
illustrates how to use the directive, function, or system variable.
SEE ALSO
directs you to related or similar directives, functions, and system variables.
Some directives, functions, and system variables differ within operating system environments (e.g., UNIX versus MS-DOS), and from one release level to another of Thoroughbred Basic. Where possible, these differences are addressed in the REMARKS section for the directive, function, or system variable. Where the differences are too significant to simply list (e.g., DSD function) there are separate entries for the different items, noting which release level or environment is applicable.
Descriptions of Thoroughbred Basic directives, functions, and variables follow the syntax conventions described below:
CAPITALS
Words in capital letters are keywords and must be entered as shown. Thoroughbred Basic is case sensitive. This means that lowercase letters are not the same as uppercase letters. Keywords are shown in uppercase letters and must be typed in uppercase letters.
lowercase
All items shown in lowercase must be supplied by you.
[Optional]
Items in small, square brackets ([ ]) indicate optional entries. You do not have to type the item enclosed by the brackets and you do not type the brackets.
[Required]
Large, square brackets are required syntax elements. You must type them. Under some circumstances, such as when you define string arrays, Thoroughbred Basic requires you to type these brackets.
Punctuation
With the exception of . . . (ellipsis), Thoroughbred Basic requires you to type the punctuation displayed in the syntax of directives, functions, and variables. This includes commas, semicolons, colons, and parentheses. An ellipsis indicates that an item can be repeated many times.
Example:
INPUT [(channel [, i/o-options])][DIM arrayname$ [element1 [, element2 [, element3]][
[(length [, initialization-value])]
In the example above, the brackets ( [ ] ) around the elements are required syntax components: to specify at least one element you must use the brackets to enclose the specification. The other brackets ([ ]) enclose optional parameters: you do not have to specify values for those parameters; if you specify values for those parameters you do not type brackets around the specifications.
Many of the parameters in the syntax definitions in the following section accept a string variable or string constant specification. For example, you can specify file-name or program-name with a variable that contains the name of a file or program, or type in the name of a file or program. All constants must be enclosed by quotes. As an example, you can type “textfile.txt” to specify a string constant for the file-name parameter.
The following is a list of all Thoroughbred Basic directives, functions, and system variables.
Note
ADD file-name
Finds a file and adds its location information
[,ERR=line-ref|,ERC=numeric-value]
to the file control table.
ADDR program-name
Finds a public program, adds its location
[,ERR=line-ref|,ERC=numeric-value]
information to the file control table, and loads
[,BNK=bank-num]
it into memory, keeping it resident as much as possible.
ADDSORT
file-name, [sort-name1:] sortdef1 Defines a new sort sequence for an MSORT or
[:mode1] [,[sort-name2:] sortdef2 [:mode2]
TISAM file.
[, … [sort-namen:] sortdefn [:moden ]]] ,
disk-num,
[,ERR=line-ref|,ERC=numeric-value]
API (library$, function$ [, argument-1, . . .,
Enables a Thoroughbred Basic program to call
argument-n])
functions from the Microsoft Windows application-programming interface (API).
BEGIN [,EXCEPT variable-name
Initializes program parameters and
[,variable-name...]]
environment.
BREAK
Abort loop control.
CALL program-name
Executes a public program, passing and
[,ERR=line-ref|,ERC=numeric-value]
receiving data specified in value-list.
[,value-list]
CLEAR [,EXCEPT variable-name
Clears certain program parameters and
[,variable-name...]]
variables.
CLEAR ERC
Resets the ERC system variable to 0, its initial value.
CLOSE (channel
Terminates operation of the designated I/O
[,ERR=line-ref|,ERC=numeric-value])
channel.
COMMIT
Terminates the TRANSACTION BEGIN
[,ERR=line-ref|,ERC=numeric-value]
directive.
CONTINUE
Next iteration of a loop control.
DEF FNx
[$] (variable-list) = string/numeric- Allows the programmer to define string or
expression
numeric functions.
DELETE [line-ref1 [,line-ref2]]
Removes statements from a program.
DELETE ARRAY
array-name [(pos1,count1) Deletes elements of an array.
[,(pos2,count2)[,(pos3,count3)]]]
Note
DIM array-name (dim1 [,dim2 [,dim3]])
Defines a numeric array of up to 3 dimensions.
[,array-name (dim1 [,dim2 [,dim3]])…]
DIM array-name [elem1 [,elem2 [,elem3]]]
Defines a string array of up to 3 dimensions.
[(length [,init-value])] . . .
DIM variable-name (length [,init-value])
Defines a string variable of a specific length.
[,variable-name (length [,init-value])…]
DIRECT file-name, key-size, num-records,
Defines a single-key, keyed-access file on disk
record-size, disk-num, sector-num
with the sizes given.
[,ERR=line-ref|,ERC=numeric-value]
DISABLE disk-num [,LOCAL]
Prohibits access to a logical disk directory and
[,ERR=line-ref|,ERC=numeric-value]
its files.
DROP file-name
Removes a file-name or all file-names from
[,ERR=line-ref|,ERC=numeric-value] the file control table that were placed there or with an ADD or ADDR directive, and releases DROP ALL the memory allocated to public programs that [,ERR=line-ref|,ERC=numeric-value] were ADDR ed.
DUMP keyword (channel
Debugs and prints on the selected channel the
[,ERR=line-ref|,ERC=numeric-value]
specified information about this task.
dump-options)
EDIT
Full screen program editor.
EDIT line-ref edit-specifier [string-constant]
Program line editor.
' [line-num]
EDIT recall directive. Retrieves the last command for editing and execution.
EDITF
Invokes the Thoroughbred Basic formatted program editor.
ENABLE disk-ident [,LOCAL]
Enables access to a previously DISABLE d
[,ERR=line-ref|,ERC=numeric-value]
logical disk directory and its files.
ENCRYPT
program-name1, program-name2 Encrypts a program to prevent LIST ing
[,PWD=passwd]
beyond line 00100.
[,ERR=line-ref|,ERC=numeric-value]
END
Terminates program operation.
ENDTRACE
Terminates program trace operations started with SETTRACE .
ENTER [variable-list]
Marks the point where a public program receives its passed data from the CALL ing program.
ERASE file-name
Removes a file from a logical disk directory
[,ERR=line-ref|,ERC=numeric-value]
and releases its disk storage space.
ESCAPE
Interrupts and suspends program execution.
Note
ESCAPE WHEN condition
Causes an escape from the program when a specified condition is met.
ESCOFF
Disables program escape trapping specified by the SETESC directive.
ESCON
Enables program escape trapping specified by the SETESC directive and reverses the effects of the ESCOFF directive.
EXECUTE string-value
Dynamically builds Thoroughbred Basic code during program execution.
EXIT [error-value]
Returns from a public program to the CALL ing program.
EXITTO line-ref
Terminates a loop or subroutine and branches to the specified line-ref.
[P]EXTRACT (channel [,I/O-opts])
Reads the next data record and prohibits access
[variable-list] [,IOL=line-ref]
by anyone else to that data record.
[P]EXTRACT RECORD (channel
Same as above except that the RECORD
[,I/O-opts]) string-variable
modifier allows the entire record, including any field separator characters, to be entered as data into a single string variable.
FILE string-value
Defines a file from a formatted FID or XFD string-value
FIND (channel [,I/O-opts]) [variable-list]
FIND s (and READ s, if found) a data record
[,IOL=line-ref]
from a file into a string of variables or single variable.
FIND RECORD (channel [,I/O-opts])
Same as FIND except that the RECORD
string-variable
modifier allows the entire record, including any field separator characters, to be entered as data into a single string variable.
FINPUT (channel, ATR=attribs [,EDT=edit
INPUT s data from a one-row Thoroughbred
modes] [,TIM= seconds]
Basic Window on a terminal; data may be
[,ERR=line-ref|,ERC=numeric-value])
longer than length of window.
variable-name
FIXUP program-name
Fixes information in the program file structure
[,ERR=line-ref|,ERC=numeric-value]
of a program on disk.
FLOATING POINT
Sets arithmetic operation environment to scientific notation as opposed to fixed point PRECISION .
FOR numeric-variable = numeric-value1 TO
Initiates a FOR/NEXT loop incrementing
numeric-value2 [STEP numeric-value3]
numeric-value from value1 to value2 by
NEXT numeric variable
value3 amount.
Note
FORMAT DEFAULT format-name
Initializes the value of all data elements and
[,OPT="DFONLY"]
loads any defaults for a selected format or for
[,ERR=line-ref|,ERC=numeric-value] all formats that have been INCLUDE d.
or
FORMAT DEFAULT ALL
[,OPT=“DFONLY”]
[,ERR=line-ref|,ERC=numeric-value]
FORMAT DELETE format-nameRemoves a selected format or all formats and
[,ERR=line-ref|,ERC=numeric-value] it releases the memory allocated to the
or format(s) INCLUDE d.
FORMAT DELETE ALL
[,ERR=line-ref|,ERC=numeric-value]
FORMAT INCLUDE format-nameLoads the format attributes from the data
[,OPT=init-type] dictionary into memory, and then initializes
[,ERR=line-ref|,ERC=numeric-value] the format's data area.
FORMAT INIT format-nameInitializes the data elements of the specified
[,ERR=line-ref|,ERC=numeric-value] format or all formats INCLUDE d by the
or current program.
FORMAT INIT ALL
[,ERR=line-ref|,ERC=numeric-value]
GET disk-num, sector-numReads data from disk-num, starting at
[,ERR=line-ref|,ERC=numeric-value], sector-num, into string-variable for the length
string-variable of string-variable (MS-DOS only).
GOSUB line-ref
Branches to line-ref and sets up a RETURN pointer to the next statement after the GOSUB .
GOTO line-ref
Branches, unconditionally, to line-ref.
IF condition [THEN ] stmt [ELSE stmt] [FI ] Test for condition and,
IF true follows the THEN stmt, but, if false, follows the ELSE stmt; terminating the statement at FI .
INDEXED file-name, num-records,
Defines a sequential file on disk with the sizes
record-size,disk-num, sector-num
given.
[,ERR=line-ref|,ERC=numeric-value]
INITFILE file-name
Clears existing file-name of its contents but
[,ERR=line-ref|,ERC=numeric-value]
retains the file allocation.
INPUT [EDT] [(channel [,I/O-opts])]
Accepts data from terminal or file, with
[@(column [,row])] [,mnemonic
several options, terminated by pressing Enter
[,mnemonic...]] [,output] [,variable-list
or F4 .
[:verification]] [,IOL=line-ref]
INPUT [EDT] RECORD [channel
Same as above except that the RECORD
[,I/O-opts])] string-variable
modifier allows the entire record, including any delimiting characters, to be entered as data into a single string variable.
Note
INSERT ARRAY array-name [(pos1,count1) Inserts elements of an array. [,(pos2,count2)[,(pos3,count3)]]]
IOLIST [@(col [,row])] [,mnemonic
Defines a list of variable names for input or
[,mnemonic...]] [,output] [,variable-list
output along with cursor positioning,
[:verification]] [,variable-list [:masking]]
prompting, and data verification or masking.
[,IOL=line-ref]
[LET] variable-name = valueAssigns a value to a variable-name.
LET FMD (string-value [,element-numberStores a string's value into the data area of a
[,occurrence-number]])=data$ format currently in memory.
[,ERR=line-ref|,ERC=numeric-value]
LET FMT (str-val [,elem-num [,occ-num]]) = Assigns the value of a string to a data name. data-val [,ERR=line-ref|,ERC=numeric-value]
LIST [(channel
Outputs program statements in their
[,ERR=line-ref|,ERC=numeric-value]
fully-expanded, interpretive format.
[,IND=index-num] [,TBL=line-ref])]
[line-ref1] [,line-ref2]
LOAD program-name [,PWD=password]
Transfers a program from storage media into memory in preparation for RUN ning or LIST ing.
LOCK (channel
Prevents access to an OPEN file by any other
[,ERR=line-ref|,ERC=numeric-value])
task until UNLOCK ed or CLOSE d.
LOG CLOSE
Closes the transaction log file system.
[,ERR=line-ref|,ERC=numeric-value]
LOG OPEN filename, option
Initializes the transaction log file system.
[,ERR=line-ref|,ERC=numeric-value]
LONGVAR
Sets syntax processing to long variable name environment.
MERGE (channel
Combines program statements from an
[,ERR=line-ref|,ERC=numeric-value]
INDEXED file with task program memory.
[,IND=index-num] [TBL=line-ref])
MSORT file-name, [ sort-name1: ] sortdef1 [
Defines a multiple-keyed, keyed access file on
:mode1 ] [, [ sort-name2: ] sortdef2 [ :mode2 ] disk with the sizes and keys given.
[, … [ sort-namen: ] sortdefn [ :moden ]]] ,
num-records, record-size, disk-num,
sector-num
[,ERR=line-ref|,ERC=numeric-value]
ON numeric-value GOSUB line-ref0
Branches to one of a list of line-refs depending
[,line-ref1 [,line-ref2...line-ref-n]]
ON the value of numeric-value and sets up a RETURN pointer to the next statement after the GOSUB .
ON
numeric-value GOTO line-ref0 [,line-ref1 Branches, unconditionally, to one of a list of
[,line-ref2...line-ref-n]]
line-refs depending on the value of numeric-value.
Note
OPEN (channelAssigns a file or device to an input/output
[,ERR=line-ref|,ERC=numeric-value] channel and makes it available for
[,OPT=file-type] [,ISZ=record-size] communication or data transfer.
[,SEP=field-sep]) file-name
PACK ARRAY array-name [ALL] ,str-var
Builds a string from the contents of a string
[,pack-oper]
array.
[,ERR=line-ref|,ERC=numeric-value]
[P ]EXTRACT (channel [,I/O-opts])
Reads the previous data record and prohibits
[variable-list] [,IOL=line-ref]
access by anyone else to that data record.
[P ]EXTRACT RECORD (channel
Same as above except that the RECORD
[,I/O-opts]) string-variable
modifier allows the entire record, including any field separator characters, to be entered as data into a single string variable.
[P ]READ [(channel [,I/O-opts])]
READ s the previous data record.
[variable-list] [,IOL=line-ref]
[P ]READ RECORD [(channel [,I/O-opts])]
Same as [P ]READ except that the RECORD
string-variable
modifier allows the entire record, including any field separators, to be entered as data into a string variable.
PRECISION numeric-value
Sets the number of significant digits to be maintained to the right of the decimal point.
PRINT [(channel [,I/O-opts])] [@(column
Outputs data from the specified variables to a
[,row])] [,mnemonic [,mnemonic…]] [,output] terminal, printer, or file. Primarily used to [,variable-list [:mask]] [,IOL=line-ref] print to terminals and printers.
PRINT RECORD [(channel [,I/O-opts])]
Same as PRINT except that the RECORD
string-variable
modifier allows an entire record, including delimiting characters, to be output as data from a single variable.
PROGRAM file-name, program-size,
Creates a new data file in a logical disk
disk-num, sector-num
directory to contain an executable program.
| [,ERR=line-ref\|,ERC=numeric-value] | |
|—|—|
| [P ]SAVE [program-name [,size, disk-num, | Writes the current contents of program |
| sector-num]] | memory to a file on a disk using a password to |
| [,ERR=line-ref\|,ERC=numeric-value] | encrypt the program file. |
| [,PWD=passwd] | |
PUT disk-num, sector-num
Writes data to a specific disk sector rather than
[,ERR=line-ref|,ERC=numeric-value],
to an OPEN file (MS-DOS only).
string-variable [,verification]
[P]READ [(channel [,I/O-opts])]
READ s the next data record.
[variable-list] [,IOL=line-ref]
Note
[P]READ RECORD [(channel [,I/O-opts])]
Same as above except that the RECORD
string-variable
modifier allows the entire record, including any field separators, to be entered as data into a string variable.
RELEASE [integer] Terminates task operation and re-allocates its or memory, returning control to the operating RELEASE [task-id] system.
REM [comment]A remarks program statement.
REMOVE (channel, KEY=string-valueRemoves a key from a SORT file or a key and
[,I/O-opts]) the associated data from a DIRECT file. The record pointer is advanced to indicate the next sequential record.
REMSORT file-name, SRT=sort-name
Removes a sort key sequence from an MSORT
[,ERR=line-ref|,ERC=numeric-value]
or TISAM file.
RENAME [disk-num,] old-file-name,
Renames a file without changing its
new-file-name
characteristics or position on its logical disk.
[,ERR=line-ref|,ERC=numeric-value]
RESERVE disk-num
Restricts access to a logical disk directory by
[,ERR=line-ref|,ERC=numeric-value]
any other task except the issuing task.
RESET
Initializes program parameters and environment.
RETRY
Transfers program execution from an error branch taken by a SETERR directive or the ERR= , END= , or DOM= options, back to the statement that generated the error and attempt to execute it again.
RETURN
Terminates a subroutine and returns program execution to the statement following the originating [ON ]GOSUB directive or the point of interruption by the Escape key.
ROLLBACK
Terminates a TRANSACTION BEGIN
[,ERR=line-ref|,ERC=numeric-value]
directive.
RUN [program-name]
Commences execution of the program.
[,ERR=line-ref|,ERC=numeric-value]
[P]SAVE [program-name [, size, disk-num,
Writes current contents of program memory to
sector-num]]
a file on a disk.
[,ERR=line-ref|,ERC=numeric-value]
[,PWD=passwd]
SERIAL file-name, num-records, record-size, Creates a new, variable record length, disk-num, sector-num sequential access file in a logical disk [,ERR=line-ref|,ERC=numeric-value] directory.
SET CMASK currency-parms
Assigns foreign currency parameters.
[,ERR=line-ref|,ERC=numeric-value]
Note
SET CTC disk-specifier, commit-count
Set commit count.
[,ERR=link-ref|,ERC=error-code]
SET DATEMASK string-value
Changes the system SQL date format.
[,ERR=line-ref|,ERC=numeric-value]
SET DATESTRINGS string-value
Changes the DATESTRINGS system
[,ERR=line-ref|,ERC=numeric-value]
variable.
SETDAY string-value
Assigns a specific date to the DAY system variable for this task.
SET DIR string-value
Changes the current directory for this task.
[,ERR=line-ref|,ERC=numeric-value]
SETDRIVE disk specifier
Changes the default logical disk directory used
[,ERR=line-ref|,ERC=numeric-value]
in file name searches.
SETERC numeric-value
Specifies a user-defined value for the ERC system variable. This variable will contain the value if an error occurred during processing; if no error occurred ERC will contain 0, its initial value.
SETERR line-ref
Transfers program execution to a specific program line number if an error occurs during execution.
SETESC line-ref
Transfers program execution to the specified program line number when the Escape key is pressed.
SET HOTKEY hotkey-value,
Enables a user to define a hotkey that calls a
"public-program"
public program.
SET PREFIX string-value
Changes the PREFIX system variable.
[,ERR=line-ref|,ERC=numeric-value]
SET PRM string-value
Sets all the PRM statements that are flags.
[,ERR=line-ref|,ERC=numeric-value]
SET TRACEMODE string
Sets the mode of tracing during a
[,ERR=line-ref|,ERC=numeric-value]
SETTRACE .
SETTIME numeric-value
Sets the TIM system variable for this task to a specific hour and decimal value (based on a 24-hour clock).
SETTRACE [(channel)]
Initiates a trace of the execution of a program on a program line basis.
SHORTVAR
Sets the environment to process short variable syntax.
SORT file-name, key-size, num-keys,
Creates a new, single-keyed file in a logical
disk-num, sector-num
disk directory containing only keys, no data.
[,ERR=line-ref|,ERC=numeric-value]
Note
START pages
Initializes a task and allocates memory for its
[,ERR=line-ref|,ERC=numeric-value]
execution.
[,BNK=bank-num] [,program-name] [,task-id]
STOP
Terminates program execution and initializes certain task parameters.
SYMTAB program-specifier,
Places, in a string array, the symbol tables
string-array-name [ ALL ]
from a program file.
[,ERR=line-ref|,ERC=numeric-value]
SYSTEM [string-value]
Temporarily exits from Thoroughbred Basic to the operating system to allow execution of any valid operating system commands or functions.
TABLE mask table
Defines a conversion table that is used to convert input or output data from one character set to another.
TEXT file-name, disk-num, sector-num
Defines a flat-file that is byte oriented, with no
[,ERR=line-ref|,ERC=numeric-value]
concept of records, to provide an interface to system text files.
TISAM file-name, sortdef1 [:mode1]
Defines a multiple-keyed, keyed access file on
[,sortdef2 [:mode2] [, ... sortdefn [:moden]]],
disk compatible to a C-ISAM file structure,
num-records, record-size, disk-num,
with the sizes and keys given.
sector-num
[,ERR=line-ref|,ERC=numeric-value]
TRANSACTION BEGIN
Begins the tracking of records.
[,ERR=line-ref|,ERC=numeric-value]
UNLOCK (channel
Allows access to a file by all other users that
[,ERR=line-ref|,ERC=numeric-value])
was previously prohibited by a LOCK directive.
UNPACK ARRAY string-value,
Re-DIM ensions, restores, and populates an
array-name[ALL]
existing string array from a string that was
[,ERR=line-ref|,ERC=numeric-value]
packed into a format with the PACK ARRAY directive.
WAIT seconds
Suspends program execution for a specified period of time.
WHILE condition WEND
Provides a loop within a program.
WINDOW ATTR (attribute-num)
Sets the current terminal attribute state.
WINDOW COLOR ( color-num )
Sets the current terminal color to a specified attribute state.
WINDOW CREATE
Defines a Thoroughbred Basic Window and all
(width,height,col1,row1) [attributes]
its attributes to the Thoroughbred Basic Window Manager and activates that Thoroughbred Basic Window.
Note
WINDOW DELETE (window-name)
Deletes a selected Thoroughbred Basic Window or all Thoroughbred Basic Windows except the base Thoroughbred Basic Window.
WINDOW FKEYS (fkey-values)
Provides for the reloading of function keys
["NAME=window-name"]
with values specific to this Thoroughbred Basic Window.
WINDOW GETINFO (array-name [ALL])
Places information about the current Thoroughbred Basic Window and
[“NAME=window-name”]
Thoroughbred Basic Window Manager status into a string array.
WINDOW IOREGION (CREATE, width,
Restricts terminal input and output to a
height, col1, row1)
selected portion of the current Thoroughbred Basic Window.
WINDOW IOREGION (DELETE)
Deletes any defined IOREGION in the currently active Thoroughbred Basic Window.
WINDOW MOVE (col1,row1)
Relocates the selected Thoroughbred Basic
"NAME=window-name"]
Window to a new column and row position on the terminal screen.
WINDOW PANEL
(CREATE, width, height, Defines an area within a Thoroughbred Basic
col1, row1, panel-name) [attributes]
Window that is available for terminal input and output.
WINDOW PANEL
(DELETE, panel-name) Deletes the designated panel-name definition.
WINDOW PANEL
(SELECT, panel-name) Activates the designated panel-name.
WINDOW PANEL (OFF)
Indicates that terminal input and output is permitted to all parts of the currently active Thoroughbred Basic Window.
WINDOW POP
Deletes the currently active Thoroughbred Basic Window and refreshes the screen vacated by the Thoroughbred Basic Window.
WINDOW
PUSH ["NAME=window-name"] Creates a new Thoroughbred Basic Window, identical in attributes to the currently active Thoroughbred Basic Window, and places the cursor in the new Thoroughbred Basic Window.
WINDOW PUT [delim-1] (map-string) Reprints a Thoroughbred Basic Window or partially or completely, with or without text, WINDOW PUT [delim-1] delim-2 attributes, and/or color.
WINDOW REFRESH
Redisplays the entire screen as it was last known to the Thoroughbred Basic Window Manager.
Note
WINDOW RESIZE (width, height)
Enlarges or reduces the size of the specified
[window-name] [,] [up-down, left-right]
Thoroughbred Basic Window based on its currently defined size and the sizing commands given.
WINDOW RESTORE (window-name)
Displays and activates a previously saved or created Thoroughbred Basic Window that is not currently active.
WINDOW SAVE (window-name)
Removes the current Thoroughbred Basic Window, saving it with a specified name, and reverts to the last known screen and position.
WINDOW SCROLL (ON)
Enables the scrolling attributes of the active Thoroughbred Basic Window or IOREGION.
WINDOW SCROLL (OFF)
Turns off the scroll attribute for the active Thoroughbred Basic Window.
WINDOW SCROLL (LEFT, col1)
Scrolls left the specified number of columns.
WINDOW SCROLL (RIGHT, col1)
Scrolls right the specified number of columns.
WINDOW SCROLL (UP, row1)
Scrolls up the specified number of rows.
WINDOW SCROLL (DOWN, row1)
Scrolls down the specified number of rows.
WINDOW SELECT ([ NOUPDATE, ]
Selects a designated Thoroughbred Basic
window-name)
Window to be the active Thoroughbred Basic Window, displaying it on top of all other Thoroughbred Basic Windows.
WINDOW SHAPE (BOX, width, height,
Allows the programmer to specify boxes or
col1, row1) [attributes] lines within Thoroughbred Basic Windows
or without restricting access to any part of the
WINDOW SHAPE (LINE, direction, col1,Thoroughbred Basic Window.
row1,length)
WINDOW SWAP
Makes the previously active Thoroughbred Basic Window active and swaps it with the currently active Thoroughbred Basic Window.
WINDOW WRAP (ON)
Enables the wrap attribute for the current Thoroughbred Basic Window.
WINDOW WRAP (OFF)
Disables the wrap attribute for the current Thoroughbred Basic Window.
WRITE [(channel [,I/O-opts])] [,variable-list
Outputs data from the specified variables to a
[:mask]] [,IOL=line-ref]
terminal, printer, or file. Primarily used for files.
WRITE RECORD [(channel [,I/O-opts])]
Same as above except that the RECORD
string-variable
modifier allows an entire record, including delimiting characters, to be output as data from a single variable.
XCALL “c-function” [,ERR=line-ref|,ERC=numeric-value] [,argument-list [. . .]]
Enables Thoroughbred Basic programs to dynamically call c-compiled programs and pass data back and forth.
Note
ABS (numeric-value
Returns the absolute value of a number.
[,ERR=line-ref|,ERC=numeric-value])
ACS (numeric-value
Returns the arc cosine of an angle in radians.
[,ERR=line-ref|,ERC=numeric-value])
ASC (string-value
Returns the unsigned integer value of the first
[,ERR=line-ref|,ERC=numeric-value])
ASCII character in a string.
ASN (numeric-value
Returns the arc sine of an angle in radians.
[,ERR=line-ref|,ERC=numeric-value])
ATN (numeric-value
Returns the arc tangent of an angle in radians.
[,ERR=line-ref|,ERC=numeric-value])
ATQ (numeric-value1, numeric-value2
Returns the arc tangent of the quotient of two
[,ERR=line-ref|,ERC=numeric-value])
angles in radians.
BSZ (bank-num
Returns the memory bank size in bytes.
[,ERR=line-ref|,ERC=numeric-value])
COS (numeric-value
Returns the cosine of an angle in radians.
[,ERR=line-ref|,ERC=numeric-value])
CTC (disk-specifier [,ERR=line-
Returns the commit count from an SQL
ref|,ERC=numeric-value])
DataServer.
DEC (string-value
Returns the signed decimal integer value of an
[,ERR=line-ref|,ERC=numeric-value])
ASCII string.
DTN (string-value [,date-mask]
Converts a date in string format into SQL
[,ERR=line-ref|,ERC=numeric-value])
numeric format.
EPT (numeric-value
Returns floating point exponent portion of a
[,ERR=line-ref|,ERC=numeric-value])
number.
ERR (error-list)
Returns the position of the value of system variable err in error-list.
EXP (numeric-value
Returns the number whose natural logarithm
[,ERR=line-ref|,ERC=numeric-value])
generated the exponent numeric-value.
FIX (numeric-value
Returns the integer portion of numeric-value;
[,ERR=line-ref|,ERC=numeric-value])
unconditionally rounded. If numeric-value is negative, the returned integer becomes more negative.
FNx (value-list)
Invokes a user-defined numeric function.
Note
FPT (numeric-value
Returns the fractional portion of any number,
[,ERR=line-ref|,ERC=numeric-value])
truncating the integer portion while maintaining the sign of the original number.
IND (channel
Returns the index number of the next record in
[,ERR=line-ref|,ERC=numeric-value]
an OPEN file.
[,END=line-ref])
INT (numeric-value
Returns the integer portion, without rounding,
[,ERR=line-ref|,ERC=numeric-value])
of a number.
LEN (string-value
Returns the length, in number of bytes, of
[,ERR=line-ref|,ERC=numeric-value])
string-value.
LOG (numeric-value)
Returns the base-10 logarithm of a numeric-value greater than zero.
MAX (numeric-value1 [,numeric-value2 [, ...
Returns the maximum numeric value from 1 or
numeric-valuen]])
more numeric values.
MIN (numeric-value1 [,numeric-value2 [, ...
Returns the minimum numeric value from 1 or
numeric-valuen]])
more numeric values.
MOD (numeric-dividend, numeric-divisor
Returns the remainder from the division of two
[,ERR=line-ref|,ERC=numeric-value])
numbers.
NEA (array-name, numeric-code
Returns information about a numeric or string
[,ERR=line-ref|,ERC=numeric-value])
array.
NLG (numeric-value
Returns the natural logarithm of a number.
[,ERR=line-ref|,ERC=numeric-value])
NMV (string-value)
Determines if the given string contains a valid numeric value.
NUM (string-value [,NTP=numeric-type]
Converts a number in string format into
[,ERR=line-ref|,ERC=numeric-value])
numeric format.
POS (search-string relational-operator
Scans a reference string for the occurrence of a
reference-string [,step-value [,occurrence]])
specified substring and returns a numeric value indicating its position.
RND (numeric-value
Generates a pseudo-random number.
[,ERR=line-ref|,ERC=numeric-value])
SGN (numeric-value
Returns +1, 0 or B1 indicating the sign of the
[,ERR=line-ref|,ERC=numeric-value])
specified numeric-value.
SIN (numeric-value
Returns the sine of an angle expressed in
[,ERR=line-ref|,ERC=numeric-value])
radians.
SQR (numeric-value
Returns the square root of a positive number.
[,ERR=line-ref|,ERC=numeric-value])
SSZ (disk-num
Returns the size of the sectors on the disk
[,ERR=line-ref|,ERC=numeric-value])
containing the specified logical disk directory.
Note
STL (string-variable)
Returns the length of string-variable; faster than LEN function; only usable with simple string variables.
TAN (numeric-value
Returns the tangent of an angle expressed in
[,ERR=line-ref|,ERC=numeric-value])
radians.
TCB (numeric-value
Returns the status of certain program
[,ERR=line-ref|,ERC=numeric-value])
execution values that change during the processing of a task.
UNT (file-name)
Returns the lowest-numbered channel on which a file is opened. If the file is not open, the result is 0.
Note
=ALL (string-value)
Returns a temporary string variable for comparison to another string variable.
AND (string-value1, string-value2
Returns the logical AND of two string-values.
[,ERR=line-ref|,ERC=numeric-value])
ARG (numeric-value
Returns the individual argument specified
[,ERR=line-ref|,ERC=numeric-value])
from the system command that was issued to start this Thoroughbred Basic task.
ATH (string-value
Converts the numeric contents of a string from
[,ERR=line-ref|,ERC=numeric-value])
ASCII characters to hexadecimal code.
ATR (name$, elem-number, attr-number
Returns the attribute value of a data element
[,ERR=line-ref|,ERC=numeric-value])
from a format currently in memory.
BIN (numeric-value,result-length
Converts a decimal integer into binary data.
[,ERR=line-ref|,ERC=numeric-value])
CGV ( string-value-1 [, string-value-2 ]
Creates and maintains global string variables.
[,ERR=line-ref|,ERC=numeric-value])
CHR (numeric-value
Converts a decimal integer into an ASCII
[,ERR=line-ref|,ERC=numeric-value])
character.
CPL (string-value
Compiles a Thoroughbred Basic statement.
[,ERR=line-ref|,ERC=numeric-value])
CPP (program-string
Generates whole programs from within a
[,ERR=line-ref|,ERC=numeric-value])
Thoroughbred Basic program
CRC (string-value [,2-byte-string]
Returns the cyclic redundancy code for
[,ERR=line-ref|,ERC=numeric-value])
string-value.
CVT (string-value, option-value
Edits a string based on the options specified.
[,ERR=line-ref|,ERC=numeric-value])
DCM (string-expression
Compresses string-expression into a series of
[,ERR=line-ref|,ERC=numeric-value])
like and unlike character packets as a new string.
Note
DIM (length [,value]
Represents a temporary string of specified
[,ERR=line-ref|,ERC=numeric-value])
length and optional init-value.
DSD (string-value
Returns system data about the specified task or
[,ERR=line-ref|,ERC=numeric-value])
device.
DSK (disk-specifier
Returns the name of the current default disk or
[,ERR=line-ref|,ERC=numeric-value])
helps determine which system disks are configured.
DTR (string, data-defn-table
Converts a string that contains fields but not
[,ERR=line-ref|,ERC=numeric-value]
field separators into a data record structure
[,SEP=field-sep] )
with fields and field separators based on specifications in data-defn-table.
ERM (numeric-value1
Returns the text of the specified error code.
[,ERR=line-ref|,ERC=numeric-value])
FID (channel
Returns the file identification data string for a
[,ERR=line-ref|,ERC=numeric-value])
file OPEN on channel.
FKY (channel [,SRT=sort-name]
Returns the first key of a key-access file
[,END=line-ref]
OPEN on channel.
[,ERR=line-ref|,ERC=numeric-value])
FMD (string-value[[,element-number]
Returns the data area or a specified portion of
[,occurrence-number]]
the data area of a format currently in memory.
[,ERR=line-ref|,ERC=numeric-value]
FMT (str-val [,elem-num [,occ-num]]
Returns the value of a data name in a
[,ERR=line-ref|,ERC=numeric-value])
formatted string.
[:fmt-mask]
FNx$ (value-list)
Invokes a user defined string function.
FST (full-path-name, option,
Returns selective file system information.
[,ERR=line-ref|,ERC=numeric-value])
GAP (string-value
Generates odd parity for each 7-bit character
[,ERR=line-ref|,ERC=numeric-value])
using the 8th bit of each byte.
HSH (string-value [,2-byte-string]
Returns a pseudo-random 2-byte string
[,ERR=line-ref|,ERC=numeric-value])
representing a hash algorithm performed on string-value and an optional, previous HSH 2-byte-string.
HTA (string-value
Converts a hexadecimal string to ASCII
[,ERR=line-ref|,ERC=numeric-value])
printable characters.
INF (numeric-value1, numeric-value2
Returns various system and task information.
[,ERR=line-ref|,ERC=numeric-value])
IOR (string-value1, string-value2
Returns a string of equal length to
[,ERR=line-ref|,ERC=numeric-value])
string-value1 and string-value2 containing the logical OR of both strings.
Note
KEY (channel [,SRT=sort-name]
Returns the next logical key value for an
[,END=line-ref]
OPEN key-access file.
| [,ERR=line-ref\|,ERC=numeric-value]) | |
|—|—|
| LKY (channel [,SRT=sort-name] | Returns the key in a file with the highest value |
| [,END=line-ref] | in the collating sequence; the last key in the |
| [,ERR=line-ref\|,ERC=numeric-value]) | file. |
LRC (string-value
Returns the longitudinal redundancy check
[,ERR=line-ref|,ERC=numeric-value])
character of string-value.
LST (string-value
Returns the interpretive format of a compiled
[,ERR=line-ref|,ERC=numeric-value])
format Thoroughbred Basic statement in string-value.
MNE (mnemonic-code [ ,channel ]
Returns the hexadecimal character sequence
[,ERR=line-ref|,ERC=numeric-value])
from the task's terminal table for the specified mnemonic, or the escape sequence from an OPEN printer mnemonic table.
NOT (string-value
Returns the logical inverse, bit by bit, of a
[,ERR=line-ref|,ERC=numeric-value])
string.
NTD (numeric-value [,date-mask]
Converts a date in SQL numeric format to a
[,ERR=line-ref|,ERC=numeric-value]
string format date.
PAD
(string-value, numeric-value [,left-right] Returns a left-justified or right-justified string
[,pad-value]
padded to the specified length with the
[,ERR=line-ref|,ERC=numeric-value])
specified pad character.
PCK (numeric-value, length
Packs an integer into a string with one byte per
[,ERR=line-ref|,ERC=numeric-value])
two digits.
PFL (string-value, symbol-table)
Prepares a compiled Thoroughbred Basic statement for LISTing.
PFP (string-value, symbol-table)
Prepares a LIST ed statement for compilation into a Thoroughbred Basic program file.
PGM (numeric-value [,MAIN])
Returns the pseudo-compiled form of the specified Thoroughbred Basic statement in the current program.
PKY (channel [,SRT=sort-name]
Returns the previous key value in a key-access
[,END=line-ref]
file without changing the current key pointer.
[,ERR=line-ref|,ERC=numeric-value])
PUB (bank-num
Returns information about the public programs
[,ERR=line-ref|,ERC=numeric-value])
in the specified memory bank.
RTD (data-record, data-defn-table
Expands data-record, which contains field
[,ERR=line-ref|,ERC=numeric-value]
separators and truncated fields, into
[,SEP=field-sep])
fixed-length fields with no field separators based on data-defn-table.
SDX (string-value
Returns the 4-character soundex value for a
[,ERR=line-ref|,ERC=numeric-value])
specified string.
Note
STR (numeric-value [:format-mask]
Converts a numeric value into a formatted
[,ERR=line-ref|,ERC=numeric-value]) string value.
or
STR (numeric-value, NTP=numeric-type,
SIZ=number-bytes
[,ERR=line-ref|,ERC=numeric-value])
SWP (string-value, swap-option
Returns a new string with byte swapping based
[,ERR=line-ref|,ERC=numeric-value])
on the value of swap-option.
TBL (string-value, table-string
Returns a converted character string based on
[,ERR=line-ref|,ERC=numeric-value]) the initial string-value and the ANDing
or function with table-string.
TBL (string-value, TBL=line-ref
[,ERR=line-ref|,ERC=numeric-value])
TSK (bank-num
Returns the memory parameters of the active
[,ERR=line-ref|,ERC=numeric-value])
task located within a specified memory bank.
TSK
(0 [,ERR=line-ref|,ERC=numeric-value]) Returns a listing of those ghost tasks, terminal ports, and peripheral devices with which this task can communicate and an indicator of their status.
TSK
(2 [,ERR=line-ref|,ERC=numeric-value]) Returns a string of the currently active ghost tasks.
TSK
(3 [,ERR=line-ref|,ERC=numeric-value]) Returns a string of the currently active terminal IDs.
UCM (string-expression
Expands a string that was compressed with
[,ERR=line-ref|,ERC=numeric-value])
DCM into its full length and value.
UPK (string-value
Unpacks the results of the PCK function.
[,ERR=line-ref|,ERC=numeric-value])
WIN ( GET [delim-1] [delim-2] )
Returns the partial or complete Thoroughbred Basic Window, with or without text, attributes, or color.
WIN ( GETCURSOR [,PHYSICAL])
Returns the current cursor position from the Thoroughbred Basic Window or terminal screen in 4 bytes.
WIN ( GETLIST )
Returns a list of the names of the active Thoroughbred Basic Windows for this task.
WIN ( GETSAVEDLIST)
Returns a list of the names of the saved Thoroughbred Basic Windows.
WIN ( GETSCREEN )
Returns the text and attribute strings for the entire terminal screen.
XFD (channel, option
Returns extended file identification
[,ERR=line-ref|,ERC=numeric-value])
information on a file or device OPEN on a channel.
XOR (string-value1, string-value2 [,ERR=line-ref|,ERC=numeric-value])
Returns the logical exclusive OR, bit by bit, of two string expressions of equal length.
Note
ARGC
Returns the number of arguments specified in the system command that was issued to start this Thoroughbred Basic task.
CDN
Returns the date in SQL numeric date format.
CDS
Returns current date in SQL string date format.
CMASK
Returns a string containing the non-defaulted foreign currency parameters.
CTL
Returns the code for certain function and editing keys on the keyboard.
DATEMASK
Returns a string that contains the current SQL date mask.
DATESTRINGS
Returns a string with a list of months and days used by SQL date functions.
DAY
Returns the task date as a string
DIR
Returns the full path name of the current directory specified by the last SET DIR directive.
DNE
Returns a 30-character string that contains the data name that was last assigned an invalid value.
DSZ
Returns available data size to programmer.
ERC
Returns the number of the user-defined error condition that last occurred during program processing.
ERR
Returns the number of the last error generated.
ERRBUF
Returns a string containing error conditions encountered when a program with formats and data names was compiled (SAVEd).
ESC
Returns the one-byte escape character ($1B$).
FDT
Returns the FDT value from the fourth entry of the CNF line in the IPL file used when this task was initialized.
FMTNL
Returns a string containing a list of format names that have been INCLUDEd.
Note
SFMTNL
Returns a string containing a list of format names that have been soft INCLUDEd.
OCH
Returns a string containing 2-byte binary representation of all OPEN channels (except channel 0).
PGCHARBASE
Returns the single character that is the base character of the sixteen portable business graphics characters used in Thoroughbred Basic.
PGN
Returns the name of the program currently in program memory space.
PRC
Returns the current setting of PRECISION or the number 127 to indicate FLOATING POINT .
PREFIX
Returns the directory path names specified by the last SET PREFIX directive.
PRM
Returns all the PRM statements that are flags.
PSZ
Returns a value that is the size of the program currently in memory.
PTN
Returns the PTN value from the second entry of the PTN line in the IPL file used when this task was initialized.
QUO
Returns the one-byte double quote character ($22$).
SEP
Returns the one-byte field separator character ($8A$).
SSN
Returns the serial number of the copy of Thoroughbred Basic installed on this computer or network system.
SYS
Returns the release number of the Thoroughbred Basic under which this system is operating and some limited data about the operating system.
TIM
Returns the time currently being used by the task in hours and decimal hours.
TRACEMODE
Returns the mode of tracing during a SETTRACE .
TSM
Returns information on the status of error and escape processing within the current task.
UNT
Returns the lowest-numbered channel that is not currently in use (open).
From the Thoroughbred Basic Developer Guide , version 8.9.1. Open this page in the PDF