IT    Universe documentation - BASIC

BASIC

Contents:

Id Description Syntax E/W
! statement Use the ! statement to insert a comment in a BASIC program. Comments explain or document various parts of a program. They are part of the source code only and are nonexecutable. They do not affect the size of the object code.   ! [comment.text]   E  
!ASYNC subroutine Use the !ASYNC subroutine (or its synonym !AMLC) to send data to, and receive data from an asynchronous device.   CALL !ASYNC (key, line, data, count, carrier)   E  
!ERRNO subroutine Use the !ERRNO subroutine to return the current value of the operating system errno variable.   CALL !ERRNO (variable)    
!FCMP subroutine Use the !FCMP subroutine to compare the equality of two floating-point numeric values as follows:   CALL !FCMP (RESULT, number1, number2 )    
!GET.PARTNUM subroutine Use the !GET.PARTNUM subroutine with distributed files to determine the number of the part file to which a given record ID belongs.   CALL !GET.PARTNUM (file, record.ID, partnum, status)   EN  
!GET.PATHNAME subroutine Use the !GET.PATHNAME subroutine to return the directory name and filename parts of a pathname.   CALL !GET.PATHNAME (pathname, directoryname, filename,
status)  
E  
!GET.PU subroutine Use the !GETPU subroutine to read individual parameters of any logical print channel.   CALL !GETPU (key, print.channel, set.value, return.code)   E  
!GET.USER.COUNTS subroutine Use the !GET.USER.COUNTS subroutine to return a count of UniVerse and system users. If any value cannot be retrieved, a value of -1 is returned.   CALL !GET.USER.COUNTS (uv.users, max.uv.users, os.users)    
!INLINE.PROMPTS subroutine Use the !INLINE.PROMPTS subroutine to evaluate a string that contains in-line prompts. In-line prompts have the following syntax:   CALL !INLINE.PROMPTS ( result , string )   EN  
!INTS subroutine Use the !INTS subroutine to retrieve the integer portion of elements in a dynamic array.   CALL !INTS (result, dynamic.array)   E  
!MAKE.PATHNAME subroutine Use the !MAKE.PATHNAME subroutine to construct the full pathname of a file. The !MAKE.PATHNAME subroutine can be used to:   CALL !MAKE.PATHNAME (path1, path2, result, status)   E  
!MATCHES subroutine Use the !MATCHES subroutine to test whether each element of one dynamic array matches the patterns specified in the elements of the second dynamic array. Each element of dynamic.array is compared with the corresponding element of match.pattern. If the element in dynamic.array matches the pattern specified in match.pattern, 1 is returned in the corresponding element of result. If the element from dynamic.array is not matched by the specified pattern, 0 is returned.   CALL !MATCHES (result, dynamic.array, match.pattern)   E  
!MESSAGE subroutine Use the !MESSAGE subroutine to send a message to another user on the system. !MESSAGE lets you change and report on the current user's message status.   CALL !MESSAGE (key, username, usernum, message, status)   EN  
!REPORT.ERROR subroutine Use the !REPORT.ERROR subroutine to print explanatory text for a UniVerse or operating system error code.   CALL !REPORT.ERROR (command, subroutine, code)   E  
!SET.PTR subroutine Use the !SET.PTR subroutine to set options for a logical print channel. This subroutine provides the same functionality as the UniVerse SETPTR command.   CALL !SET.PTR (print.channel, width, length, top.margin,
bottom.margin, mode, options)  
E  
!SET.PU subroutine Use the !SETPU subroutine to set individual parameters of any logical print channel.   CALL !SETPU (key, print.channel, new.value, return.code)   E  
!TIMDAT subroutine Use the !TIMDAT subroutine to return a dynamic array containing the time, date, and other related information. The !TIMDAT subroutine returns a 13-element dynamic array containing information shown in the following list.   CALL !TIMDAT (variable)   E  
!USER.TYPE subroutine Use the !USER.TYPE subroutine to return the user type of the current process and a flag to indicate if the user is a UniVerse Administrator.   CALL !USER.TYPE (type, admin)   E  
!VOC.PATHNAME subroutine Use the !VOC.PATHNAME subroutine to extract the pathnames for the data file or the file dictionary of a specified VOC entry.   CALL !VOC.PATHNAME (data/dict, voc.entry, result, status)   E  
#INCLUDE statement Use the #INCLUDE statement to direct the compiler to insert the source code in the record program and compile it with the main program. The #INCLUDE statement differs from the $CHAIN statement in that the compiler returns to the main program and continues compiling with the statement following the #INCLUDE statement.   #INCLUDE [filename] program
#INCLUDE program FROM filename  
E  
$CHAIN statement Use the $CHAIN statement to direct the compiler to read source code from program and compile it as if it were part of the current program. The $CHAIN statement differs from the $INCLUDE, #INCLUDE, and INCLUDE statements in that the compiler does not return to the main program. Any statements appearing after the $CHAIN statement are not compiled or executed.   $CHAIN [filename] program   E  
$COPYRIGHT statement Use the $COPYRIGHT statement to specify the copyright information that is inserted in the copyright field of the object header code.   $COPYRIGHT "copyright.notice"    
$DEFINE Use the $DEFINE statement to define identifiers that control program compilation. $UNDEFINE removes the definition of an identifier.   $DEFINE identifier [replacement.text]
.
.
.
$IFDEF identifier
[statements]
$ELSE
[statements]
$ENDIF  
EN  
$EJECT Use the $EJECT statement to begin a new page in the listing record.   $EJECT    
$ELSE Use the $ELSE statement to introduce the alternative clauses of an $IFDEF or   $ELSE   E  
$ENDIF statement Use the $ENDIF statement to end a conditional compilation block.   $ENDIF   E  
$IFNDEF statement Use the $IFNDEF statement to test for the definition of a compile time symbol. The $IFNDEF statement is a complement to the $IFDEF statement.   $IFNDEF identifier
[statements]
[[$ELSE]
[statements]]
$ENDIF  
E  
$INCLUDE statement Use the $INCLUDE statement to direct the compiler to insert the source code in the record program and compile it with the main program. The $INCLUDE statement differs from the $CHAIN statement in that the compiler returns to the main program and continues compiling with the statement following the $INCLUDE statement.   $INCLUDE [filename] program
$INCLUDE program FROM filename  
E  
$INDEF statement Use the $IFDEF statement to test for the definition of a compile-time symbol. $IFDEF tests to see if identifier is currently defined (that is, has appeared in a $DEFINE statement and has not been undefined).   $IFDEF identifier
[statements]
[[$ELSE]
[statements]]
$ENDIF  
E  
$INSERT statement Use the $INSERT statement to direct the compiler to insert the source code contained in the file specified by primos.pathname and compile it with the main program. The difference between $INSERT and $INCLUDE (and its synonyms #INCLUDE and INCLUDE) is that $INSERT takes a PRIMOS pathname as an argument, whereas $INCLUDE takes a UniVerse filename and record ID. The PRIMOS pathname is converted to a pathname; any leading *> is ignored.   $INSERT primos.pathname   E  
$MAP statement In NLS mode, use the $MAP statement to direct the compiler to specify the map for the source code. Use the $MAP statement if you use embedded literal strings that contain non-ASCII characters.   $MAP mapname   EN  
$OPTIONS statement Use the $OPTIONS statement to set compile-time emulation of any UniVerse flavor. This does not allow object code compiled in one flavor to execute in another flavor. You can select individual options in a program to override the default setting.   $OPTIONS [flavor] [options]   E  
$PAGE statement The $PAGE statement is a synonym for the $EJECT statement.      
$UNDEFINE statement Use the $UNDEFINE statement to remove the definition of identifiers set with the $DEFINE statement. The $UNDEFINE statement removes the definition of identifier from the symbol table if it appeared in a previous $DEFINE statement. If the identifier was not previously defined, $UNDEFINE has no effect.   $UNDEFINE identifier    
* statement Use the * statement to insert a comment in a BASIC program. Comments explain or document various parts of a program. They are part of the source code only and are nonexecutable. They do not affect the size of the object code.   * [comment.text]   E  
< > operator Use the < > operator (angle brackets) to extract or replace elements of a dynamic array.   variable < field# [,value# [,subvalue#]] >    
@ function Use the @ function with the PRINT statement to control display attributes, screen display, and cursor postioning.   @ (column [,row])
@ (-code [,arg])  
EN  
@variables @ABORT.CODE * A numeric value indicating the type of condition that caused the ON.ABORT paragraph to execute. The values are:      
ABORT statement Use the ABORT statement to terminate execution of a BASIC program and return to the UniVerse prompt. ABORT differs from STOP in that a STOP statement returns to the calling environment (for example, a menu, a paragraph, another BASIC program following an EXECUTE statement, and so on), whereas ABORT terminates all calling environments as well as the BASIC program. You can use it as part of an IF...THEN statement to terminate processing if certain conditions exist.   ABORT [expression ...]
ABORTE [expression ...]
ABORTM [expression ...]  
E  
ABS function Use the ABS function to return the absolute value of any numeric expression. The absolute value of an expression is its unsigned magnitude. If expression is negative, the value returned is:   ABS (expression)   E  
ABSS function Use the ABSS function to return the absolute values of all the elements in a dynamic array. If an element in dynamic.array is the null value, null is returned for that element.   ABSS (dynamic.array)   E  
ACOS function Use the ACOS function to return the trigonometric arc-cosine of expression. expression must be a numeric value. The result is expressed in degrees. If expression evaluates to the null value, null is returned. The ACOS function is the inverse of the COS function.   ACOS (expression)   E  
ADDS function Use the ADDS function to create a dynamic array of the element-by-element addition of two dynamic arrays.   ADDS (array1, array2)   E  
ALPHA function Use the ALPHA function to determine whether expression is an alphabetic or nonalphabetic string. If expression contains the characters a through z or A through Z, it evaluates to true and a value of 1 is returned. If expression contains any other character or an empty string, it evaluates to false and a value of 0 is returned. If expression evaluates to the null value, null is returned.   ALPHA (expression)   E  
ANDS function Use the ANDS function to create a dynamic array of the logical AND of corresponding elements of two dynamic arrays.   ANDS (array1, array2)   E  
Arithmetic Operators Arithmetic operators combine operands comprising one or more variables, constants, or intrinsic functions. Resulting arithmetic expressions can be combined with other expressions almost indefinitely. The syntax of arithmetic expressions is:      
Array Variables An array is a variable that represents more than one data value. There are two types of array: dimensioned and dynamic. Dimensioned arrays can be either standard or fixed. Fixed arrays are provided in PICK, IN2, and REALITY flavor accounts for compatibility with other Pick systems.      
ASCII function Use the ASCII function to convert each character of expression from its EBCDIC representation value to its ASCII representation value. If expression evaluates to the null value, null is returned.   ASCII (expression)   E  
ASIN function Use the ASIN function to return the trigonometric arc-sine of expression. expression must be a numeric value. The result is expressed in degrees. If expression evaluates to the null value, null is returned. The ASIN function is the inverse of the SIN function.   ASIN (expression)   E  
ASSIGNED function Use the ASSIGNED function to determine if variable is assigned a value. ASSIGNED returns 1 (true) if variable is assigned a value, including common variables and the null value. It returns 0 (false) if variable is not assigned a value.   ASSIGNED (variable)   E  
Assignment Operators Assignment operators are used in UniVerse BASIC assignment statements to assign values to variables. The following table shows the operators and their uses.      
ATAN function Use the ATAN function to return the trigonometric arc-tangent of expression. expression must be a numeric value. The result is expressed in degrees. If expression evaluates to the null value, null is returned. The ATAN function is the inverse of the TAN function.   ATAN (expression)   E  
AUTHORIZATION statement Use the AUTHORIZATION statement to specify or change the effective run-time user of a program. After an AUTHORIZATION statement is executed, any SQL security checking acts as if username is running the program.   AUTHORIZATION "username"   E  
AUXMAP statement In NLS mode, use the AUXMAP statement to associate an auxiliary device with a terminal.   AUXMAP {ON | OFF | expression}    
BEGIN CASE statement Use the BEGIN CASE statement to begin a set of CASE statements. For details, see the CASE statement.      
BEGIN TRANSACTION statement Use the BEGIN TRANSACTION statement to indicate the beginning of a transaction.   BEGIN TRANSACTION [ISOLATION LEVEL level]
[statements]  
E  
BITAND function Use the BITAND function to perform the bitwise AND comparison of two integers specified by numeric expressions. The bitwise AND operation compares two integers bit by bit. It returns a bit of 1 if both bits are 1; otherwise it returns a bit of 0.   BITAND (expression1, expression2)   EN  
BITNOT function Use the BITNOT function to return the bitwise negation of an integer specified by any numeric expression.   BITNOT (expression [,bit#])   EN  
BITOR function Use the BITOR function to perform the bitwise OR comparison of two integers specified by numeric expressions. The bitwise OR operation compares two integers bit by bit. It returns the bit 1 if the bit in either or both numbers is 1; otherwise it returns the bit 0.   BITOR (expression1, expression2)   EN  
BITRESET function Use the BITRESET function to reset to 0 the bit number of the integer specified by expression. Bits are counted from right to left. The number of the rightmost bit is 0. If the bit is 0, it is left unchanged.   BITRESET (expression, bit#)   E  
BITSET function Use the BITSET function to set to 1 the bit number of the integer specified by expression. The number of the rightmost bit is 0. If the bit is 1, it is left unchanged.   BITSET (expression, bit#)   E  
BITTEST function Use the BITTEST function to test the bit number of the integer specified by expression. The function returns 1 if the bit is set; it returns 0 if it is not. Bits are counted from right to left. The number of the rightmost bit is 0.   BITTEST (expression, bit#)   E  
BITXOR function Use the BITXOR function to perform the bitwise XOR comparison of two integers specified by numeric expressions. The bitwise XOR operation compares two integers bit by bit. It returns a bit 1 if only one of the two bits is 1; otherwise it returns a bit 0.   BITXOR (expression1, expression2)   EN  
BREAK statement Use the BREAK statement to enable or disable the Intr, Quit, and Susp keys on the keyboard.   BREAK [KEY] ON
BREAK [KEY] OFF
BREAK [KEY] expression  
E  
BSCAN statement Use the BSCAN statement to scan the leaf nodes of a B-tree file (type 25) or of a secondary index. The record ID returned by the current scan operation is assigned to ID.variable. If you specify rec.variable, the contents of the record whose ID is ID.variable is assigned to it.   BSCAN ID.variable [,rec.variable] [FROM [[file.variable,]
record]
[USING indexname] [RESET] [BY seq]
{THEN statements [ELSE statements] | ELSE statements}  
E  
BYTE statement In NLS mode, use the BYTE function to generate a byte from the numeric value of expression. BYTE returns a string containing a single byte.   BYTE (expression)   E  
BYTELEN statement In NLS mode, use the BYTELEN function to generate the number of bytes contained in the ASCII string value in expression.   BYTELEN (expression)    
BYTETYPE statement In NLS mode, use the BYTETYPE function to determine the function of a byte in value.   BYTETYPE (value)    
BYTEVAL statement In NLS mode, use the BYTEVAL function to examine the bytes contained in the internal string value of expression. The BYTEVAL function returns a number from 0 to 255 as the byte value of n in expression. If you omit n, 1 is assumed.   BYTEVAL (expression [, n] )    
CALL statement Use the CALL statement to transfer program control from the calling program to an external subroutine that has been compiled and cataloged.   CALL subroutine [( [MAT] argument [, [MAT] argument ...] )]   E  
CASE statement Use the CASE statement to alter the sequence of instruction execution based on the value of one or more expressions. If expression in the first CASE statement is true, the following statements up to the next CASE statement are executed. Execution continues with the statement following the END CASE statement.   BEGIN CASE
CASE expression
statements
[CASE expression
statements
.
.
.]
END CASE  
E  
CATS function Use the CATS function to create a dynamic array of the element-by-element concatenation of two dynamic arrays.   CATS (array1, array2)   E  
CHAIN statement Use the CHAIN statement to terminate execution of a BASIC program and to execute the value of command. command is an expression that evaluates to any valid UniVerse command. If command evaluates to the null value, the CHAIN statement fails and the program terminates with a run-time error message.   CHAIN command   E  
CHANGE function Use the CHANGE function to replace a substring in expression with another substring. If you do not specify occurrence, each occurrence of the substring is replaced.   CHANGE (expression, substring, replacement [,occurrence
[,begin]] )  
E  
CHAR function Use the CHAR function to generate an ASCII character from the numeric value of expression.   CHAR (expression)   EN  
Character String Data Character string data is represented internally as a sequence of ASCII characters. Character strings can represent either numeric or nonnumeric data. Their length is limited only by the amount of available memory. Numeric and nonnumeric data can be mixed in the same character string (for example, in an address).      
CHARS function Use the CHARS function to generate a dynamic array of ASCII characters from the decimal numeric value of each element of dynamic.array.   CHARS (dynamic.array)   E  
CHECKSUM function Use the CHECKSUM function to return a cyclical redundancy code (a checksum value).   CHECKSUM (string)   E  
CLEAR statement Use the CLEAR statement at the beginning of a program to set all assigned and unassigned values of variables outside of the common area of the program to 0. This procedure avoids run- time errors for unassigned variables. If you use the CLEAR statement later in the program, any values assigned to noncommon variables (including arrays) are lost.   CLEAR [COMMON]   E  
CLEARDATA statement Use the CLEARDATA statement to flush all data that has been loaded in the input stack by the DATA statement. No expressions or spaces are allowed with this statement. Use the CLEARDATA statement when an error is detected, to prevent data placed in the input stack from being used incorrectly.   CLEARDATA   E  
CLEARFILE statement Use the CLEARFILE statement to delete all records in an open dictionary or data file. You cannot use this statement to delete the file itself. Each file to be cleared must be specified in a separate CLEARFILE statement.   CLEARFILE [file.variable] [ON ERROR statements] [LOCKED
statements]  
E  
CLEARPROMPTS statement Use the CLEARPROMPTS statement to clear the value of the in- line prompt. Once a value is entered for an in-line prompt, the prompt continues to have that value until a CLEARPROMPTS statement is executed, unless the in-line prompt control option A is specified. CLEARPROMPTS clears all values that have been entered for in-line prompts.   CLEARPROMPTS    
CLEARSELECT statement Use the CLEARSELECT statement to clear an active select list. This statement is normally used when one or more select lists have been generated but are no longer needed. Clearing select lists prevents remaining select list entries from being used erroneously.   CLEARSELECT [ALL | list.number]   E  
CLOSE statement Use the CLOSE statement after opening and processing a file. Any file locks or record locks are released.   CLOSE [file.variable] [ON ERROR statements]   E  
CLOSESEQ statement Use the CLOSESEQ statement after opening and processing a file opened for sequential processing. CLOSESEQ makes the file available to other users.   CLOSESEQ file.variable [ON ERROR statements]   E  
COL1 function Use the COL1 function after the execution of a FIELD function to return the numeric value for the character position that immediately precedes the selected substring (see the FIELD function). Although the COL1 function takes no arguments, parentheses are required to identify it as a function.   COL1 ( )   E  
COL2 function Use the COL2 function after the execution of a FIELD function to return the numeric value for the character position that immediately follows the selected substring (see the FIELD function). Although the COL2 function takes no arguments, parentheses are required to identify it as a function.   COL2 ( )   E  
COMMIT statement Use the COMMIT statement to commit all file I/O changes made during a transaction. The WORK keyword is provided for compatibility with SQL syntax conventions; it is ignored by the compiler.   COMMIT [WORK] [THEN statements] [ELSE statements]   E  
COMMON statement Use the COMMON statement to provide a storage area for variables. Variables in the common area are accessible to main programs and external subroutines. Corresponding variables can have different names in the main program and in external subroutines, but they must be defined in the same order. The COMMON statement must precede any reference to the variables it names.   COM[MON] [/name/] variable [,variable ...]   E  
COMPARE statement Use the COMPARE function to compare two strings and return a numeric value indicating the result.   COMPARE (string1, string2 [,justification])   E  
Constants Constants are data that do not change in value, data type, or length during program execution. Constants can be character strings or numeric strings (in either integer or floating- point form). A character string of no characters--the empty string--can also be a constant.      
CONTINUE function The CONTINUE statement is a loop-controlling statement. For syntax details, see the FOR statement and the LOOP statement.      
CONVERT statement Use the CONVERT statement to replace every occurrence of specific characters in a string with other characters. Every time the character to be converted appears in the string, it is replaced by the replacement character.   CONVERT expression1 TO expression2 IN variable   E  
CONVERT function Use the CONVERT function to return a copy of variable with every occurrence of specified characters in variable replaced with other specified characters. Every time a character to be converted appears in variable, it is replaced by the replacement character.   CONVERT (expression1, expression2, variable)   E  
COS function Use the COS function to return the trigonometric cosine of an angle. expression is an angle expressed as a numeric value in degrees. The COS function is the inverse of the ACOS function.   COS (expression)   E  
COSH function Use the COSH function to return the hyperbolic cosine of expression. expression must be a numeric value.   COSH (expression)   E  
COUNT function Use the COUNT function to return the number of times a substring is repeated in a string value.   COUNT (string, substring)   E  
COUNTS function Use the COUNTS function to count the number of times a substring is repeated in each element of a dynamic array. The result is a new dynamic array whose elements are the counts corresponding to the elements in dynamic.array.   COUNTS (dynamic.array, substring)   E  
CREATE statement Use the CREATE statement after an OPENSEQ statement to create a record in a type 1 or type 19 UniVerse file or to create a UNIX or DOS file. CREATE creates the record or file if the OPENSEQ statement fails. An OPENSEQ statement for the specified file.variable must be executed before the CREATE statement to associate the pathname or record ID of the file to be created with the file.variable. If file.variable is the null value, the CREATE statement fails and the program terminates with a run-time error messa ge.   CREATE file.variable {THEN statements [ELSE statements]
| ELSE statements}  
E  
CRT statement Use the CRT statement to print data on the screen, regardless of whether a PRINTER ON statement has been executed. The syntax for print.list is the same as for PRINT statements.   CRT [print.list]   E  
DATA statement Use the DATA statement to place values in an input stack. These values can be used as responses to INPUT statements executed later in the program or in a subroutine (see the INPUT statement). The values can also serve as responses to UniVerse commands that request input.   DATA expression [,expression ...]   E  
DATE function Use the DATE function to return the numeric value of the internal system date. Although the DATE function takes no arguments, parentheses are required to identify it as a function.   DATE ( )   E  
DCOUNT function Use the DCOUNT function to return the number of delimited fields in a data string.   DCOUNT (string, delimiter)   E  
DEBUG statement Use the DEBUG statement to invoke RAID, the interactive UniVerse BASIC debugger. The DEBUG statement takes no arguments. When this statement is encountered, program execution stops and the double colon ( :: ) prompt appears, waiting for a RAID command. The following table summarizes the RAID commands:   DEBUG    
DEFFUN statement Use the DEFFUN statement to define a user-written function. You must declare a user-defined function before you can use it in a program. The DEFFUN statement provides the compiler with information such as the function name and the number and type of arguments. You can define a user-written function only once in a program. A subsequent DEFFUN statement for an already defined user-written function causes a fatal error.   DEFFUN function [([MAT] argument [, [MAT] argument...])]
[CALLING call.ID]  
E  
DEL statement Use the DEL statement to delete a field, value, or subvalue from a dynamic array. The DEL statement works similarly to the DELETE function.   DEL dynamic.array < field# [,value# [,subvalue#]] >   E  
DELETE statement Use the DELETE statements to delete a record from a UniVerse file. If you specify a file variable, the file must be open when the DELETE statement is encountered (see the OPEN statement).   DELETE [file.variable ,] record.ID [ON ERROR statements]
[LOCKED statements]
[THEN statements] [ELSE statements]  
E  
DELETE function Use the DELETE function to erase the data contents of a specified field, value, or subvalue and its corresponding delimiter from a dynamic array. The DELETE function returns the contents of the dynamic array with the specified data removed without changing the actual value of the dynamic array.   DELETE (dynamic.array, field#[,value#[,subvalue#]] )   E  
DELETELIST statement Use the DELETELIST statement to delete a select list saved in the &SAVEDLISTS& file.   DELETELIST listname    
DELETEU statement Use the DELETEU statement to maintain an update record lock while performing the DELETE statement.      
DIMENSION statement Use the DIMENSION statement to define the dimensions of an array variable before referencing the array in the program. For a matrix (a two-dimensional array), use the DIMENSION statement to set the maximum number of rows and columns available for the elements of the array. For a vector (a one- dimensional array), use the DIMENSION statement to set the maximum value of the subscript (the maximum elements) in the array.   DIM[ENSION] matrix (rows, columns) [, matrix (rows,
columns) ...]  
E  
DISPLAY statement Use the DISPLAY statement to print data on the screen, regardless of whether a PRINTER ON statement has been executed. The syntax for print.list is the same as for PRINT statements.   DISPLAY [print.list]   E  
DIV function Use the DIV function to calculate the value of the quotient after dividend is divided by divisor.   DIV (dividend, divisor)   E  
DIVS function Use the DIVS function to create a dynamic array containing the result of the element-by-element division of two dynamic arrays.   DIVS (array1, array2)   E  
DOWNCASE function Use the DOWNCASE function to change all uppercase letters in expression to lowercase. If expression evaluates to the null value, null is returned.   DOWNCASE (expression)   E  
DQUOTE function Use the DQUOTE function to enclose an expression in double quotation marks. If expression evaluates to the null value, null is returned.   DQUOTE (expression)   E  
DTX function Use the DTX function to convert a decimal integer to its hexadecimal equivalent.   DTX (number [,size] )   E  
Dynamic Array Operations UniVerse BASIC provides a number of special functions that are designed to perform common operations on dynamic arrays.      
EBCDIC function Use the EBCDIC function to convert each character of expression from its ASCII representation value to its EBCDIC representation value. The EBCDIC and ASCII functions perform complementary operations. Data that is not represented in ASCII code produces undefined results.   EBCDIC (expression)   E  
ECHO statement Use the ECHO statement to control the display of input characters on the screen.   ECHO {ON | OFF | expression}   E  
END statement Use the END statement to terminate a BASIC program or a section of an IF, READ, or OPEN statement.   END   E  
END CASE statement Use the END CASE statement to end a set of CASE statements.      
END TRANSACTION statement Use the END TRANSACTION statement to specify where processing is to continue after a transaction ends.      
ENTER statement Use the ENTER statement to transfer program control from the calling program to an external subroutine without returning to the calling program. The subroutine must have been compiled and cataloged.   ENTER subroutine   E  
EOF(ARG.) function Use the EOF(ARG.) function to check if the command line argument pointer is past the last command line argument. ARG. is part of the syntax of the EOF(ARG.) function and must be specified. EOF(ARG.) returns 1 (true) if the pointer is past the last command line argument, otherwise it returns 0 (false).   EOF(ARG.)    
EQS function Use the EQS function to test if elements of 1 dynamic array are equal to the elements of another dynamic array.   EQS (array1, array2)   E  
EQUATE statement In an EQUATE statement, symbol represents the value of expression or string. You can use the two interchangeably in the program. When the program is compiled, each occurrence of symbol is replaced by the value of expression or string. The value is compiled as object code and does not have to be reassigned each time the program is executed.   EQU[ATE] symbol TO expression [,symbol TO expression ...]   E  
EREPLACE function Use the EREPLACE function to replace substring in expression with another substring. If you do not specify occurrence, each occurrence of substring is replaced.   EREPLACE (expression, substring, replacement [,occurrence
[,begin]] )  
E  
ERRMSG statement Use the ERRMSG statement to print a formatted error message from the ERRMSG file.   ERRMSG message.ID [,message.ID ...]   E  
EXCHANGE function Use the EXCHANGE function to replace one character with another or to delete all occurrences of the specified character.   EXCHANGE (string, xx, yy)   EN  
EXECUTE statement Use the EXECUTE statement to execute UniVerse commands from within the BASIC program and then return execution to the statement following the EXECUTE statement.   EXECUTE commands [CAPTURING variable]
[PASSLIST [dynamic.array]] [RTNLIST [variable]]
[{SETTING | RETURNING} variable]  
E  
EXIT statement Use the EXIT statement to quit execution of a LOOP...REPEAT loop and branch to the statement following the REPEAT statement of the loop. The EXIT statement quits exactly one loop. When loops are nested and the EXIT statement is executed in an inner loop, the outer loop remains in control.   EXIT   E  
EXP function Use the EXP function to return the value of "e" raised to the power designated by expression. The value of "e" is approximately 2.71828. expression must evaluate to a numeric value.   EXP (expression)   E  
EXTRACT function Use the EXTRACT function to access the data contents of a specified field, value, or subvalue from a dynamic array. You can use either syntax shown to extract data. The first syntax uses the EXTRACT keyword, the second uses angle brackets.   EXTRACT (dynamic.array, field# [,value# [,subvalue#]])   E  
FADD function Use the FADD function to perform floating-point addition on two numeric values. If either number evaluates to the null value, null is returned. If either number1 or number2 evaluates to the null value, null is returned. return.array equates to number1 plus number2.   FADD (number1, number2)   E  
FDIV function Use the FDIV function to perform floating-point division on two numeric values. number1 is divided by number2. return.array equates to number1 divided by number2. If number2 is 0, a run-time error message is produced and a 0 is returned for the function. If either number evaluates to the null value, null is returned.   FDIV (number1, number2)   E  
FFIX function Use the FFIX function to convert a floating-point number to a numeric string with fixed precision. If number evaluates to the null value, null is returned.   FFIX (number)    
FFLT function Use the FFLT function to round a number to a string with a precision of 13. The number also converts to scientific notation when required for precision. If number evaluates to the null value, null is returned.   FFLT (number)    
FIELD function Use the FIELD function to return 1 or more substrings located between specified delimiters in string.   FIELD (string, delimiter, occurrence [,num.substr] )   E  
FIELDS function Use the FIELDS function to return a dynamic array of substrings located between specified delimiters in each element of dynamic.array.   FIELDS (dynamic.array, delimiter, occurrence [,num.substr] )   E  
FIELDSTORE function Use the FIELDSTORE function to modify character strings by inserting, deleting, or replacing fields separated by specified delimiters.   FIELDSTORE (string, delimiter, start, n, new.string)   E  
File Variables A file variable is created by a form of the OPEN statement. Once opened, a file variable is used in I/O statements to access the file. There are two types of file variable: hashed file variable and sequential file variable. File variables can be scalars or elements of a dimensioned array.      
FILEINFO function Use the FILEINFO function to return information about the specified file's configuration, such as the specified file's parameters, its modulus and load, its operating system filename, and its VOC name. The information returned depends on the file type and the value of the key.   FILEINFO ( file.variable , key)   EN  
FILELOCK statement Use the FILELOCK statement to acquire a lock on an entire file. This prevents other users from updating the file until the program releases it. A FILELOCK statement with the default lock type lock.type is equivalent to obtaining an update record lock on every record of the file.   FILELOCK [file.variable] [,lock.type]
[ON ERROR statements] [LOCKED statements]  
E  
FILEUNLOCK statement Use the FILEUNLOCK statement to release a file lock set by the FILELOCK statement.   FILEUNLOCK [file.variable] [ON ERROR statements]   E  
FIND statement Use the FIND statement to locate an element in dynamic.array. The field, value, and subvalue positions of element are put in the variables fmc, vmc, and smc respectively.   FIND element IN dynamic.array [,occurrence]
SETTING fmc [,vmc [,smc]]
{THEN statements [ELSE statements] | ELSE statements}  
E  
FINDSTR statement Use the FINDSTR statement to locate substring in dynamic.array. The field, value, and subvalue positions of substring are placed in the variables fmc, vmc, and smc respectively.   FINDSTR substring IN dynamic.array [,occurrence]
SETTING fmc [,vmc [,smc]]
{THEN statements [ELSE statements] | ELSE statements}  
E  
FIX function Use the FIX function to convert a numeric value to a floating-point number with a specified precision. FIX lets you control the accuracy of computation by eliminating excess or unreliable data from numeric results. For example, a bank application that computes the interest accrual for customer accounts does not need to deal with credits expressed in fractions of cents. An engineering application needs to throw away digits that are beyond the accepted reliability of computations.   FIX (number [,precision [,mode]] )   E  
FLUSH statement The FLUSH statement causes all the buffers for a sequential I/O file to be written immediately. Normally, sequential I/O uses UNIX "stdio" buffering for input/output operations, and writes are not performed immediately.   FLUSH file.variable {THEN statements [ELSE statements]
| ELSE statements}  
E  
FMT function Use the FMT function or a format expression to format data for output. Any BASIC expression can be formatted for output by following it with a format expression.   FMT (expression, format)   EN  
FMTDP function In NLS mode, use the FMTDP function to format data for output in display positions rather than character lengths.   FMTDP (expression, format [, mapname] )    
FMTS function Use the FMTS function to format elements of dynamic.array for output. Each element of the array is acted upon independently and is returned as an element in a new dynamic array.   FMTS (dynamic.array, format)    
FMTSDP function In NLS mode, use the FMTSDP function to format elements of dynamic.array for output in display positions rather than character lengths. Each element of the array is acted upon independently and is returned as an element in a new dynamic array.   FMTSDP (dynamic.array, format [, mapname] )   N  
FMUL function Use the FMUL function to perform floating-point multiplication on two numeric values. If either number evaluates to the null value, null is returned. return.array equates to number1 multiplied by number2.   FMUL (number1, number2)   E  
FOLD function Use the FOLD function to divide a string into a number of substrings separated by field marks.   FOLD (string, length )   E  
FOLDDP function In NLS mode, use the FOLDDP function to divide a string into a number of substrings separated by field marks. The division is in display positions rather than character lengths.   FOLDDP (string, length [, mapname] )    
FOOTING statement Use the FOOTING statement to specify the text and format of the footing to print at the bottom of each page of output.   FOOTING [ON print.channel] footing   N  
FOR statement Use the FOR statement to create a FOR...NEXT program loop. A program loop is a series of statements that execute repeatedly until the specified number of repetitions have been performed or until specified conditions are met.   FOR variable = start TO end [STEP increment]
[loop.statements]
[CONTINUE]
[{WHILE | UNTIL} expression]
[loop.statements]
[CONTINUE]
NEXT [variable]  
E  
Format Expressions A format expression formats variables for output. It specifies the size of the field in which data is displayed or printed, the justification (left, right, or text), the number of digits to the right of the decimal point to display, and so on. Format expressions work like the FMT function. The syntax is:      
FORMLIST statement The FORMLIST statement is the same as the SELECT statement.   FORMLIST [variable] [TO list.number] [ON ERROR statements]    
FSUB function Use the FSUB function to perform floating-point subtraction on two numeric values. number2 is subtracted from number1. If either number evaluates to the null value, null is returned. result equates to number1 minus number2.   FSUB (number1, number2)   E  
FUNCTION statement Use the FUNCTION statement to identify a user-written function and to specify the number and names of the arguments to be passed to it. The FUNCTION statement must be the first noncomment line in the user-written function. A user-written function can contain only one FUNCTION statement.   FUNCTION [name] [( [MAT] variable [, [MAT] variable ...] )]   E  
GES function Use the GES function to test if elements of one dynamic array are greater than or equal to corresponding elements of another dynamic array.   GES (array1, array2)    
GET statement Use GET statements to read a block of data from an input stream associated with a device, such as a serial line or terminal. The device must be opened with the OPENDEV or OPENSEQ statement. Once the device has been opened, the GET statements read data from the device. The GET statements do not perform any pre- or postprocessing of the data stream, nor do they control local echo characteristics. These aspects of terminal control are handled either by the application or by the device driver. The behavior of certain devices can be managed through the TTYSET/TTYGET interface.   GET[X] read.var[, length] [SETTING read.count] FROM device
[UNTIL eop.char.list] [RETURNING last.char.read]
[WAITING seconds] [THEN statements] [ELSE statements]  
EN  
GET(ARG.) statement Use the GET(ARG.) statement to retrieve the next command line argument. The command line is delimited by blanks, and the first argument is assumed to be the first word after the program name. When a cataloged program is invoked, the argument list starts with the second word in the command line.   GET(ARG. [,arg#] ) variable [THEN statements] [ELSE
statements]  
E  
GETLIST statement Use the GETLIST statement to activate a saved select list so that a READNEXT statement can use it.   GETLIST listname [TO list.number] [SETTING variable]
{THEN statements [ELSE statements] | ELSE statements}  
 
GETLOCALE function In NLS mode, use the GETLOCALE function to display the names of specified categories of the current locale. The GETLOCALE function also displays the details of any saved locale that differs from the current one.   GETLOCALE (categories)    
GETREM function Use the GETREM function after the execution of a REMOVE statement, a REMOVE function, or a REVREMOVE statement, to return the numeric value for the character position of the pointer associated with dynamic.array.   GETREM (dynamic.array)   E  
GETX statement Use the GETX statement to read a block of data from an input stream and return the characters in ASCII hexadecimal format. For details, see the GET statements.      
GOSUB statement Use the GOSUB statement to transfer program control to an internal subroutine referenced by statement.label. A colon (:) is optional in GOSUB statements, even though it is required after nonnumeric statement labels at the beginning of program lines.   GOSUB statement.label [:]   E  
GOTO statement Use the GOTO statement to transfer program control to the statement specified by statement.label. A colon (:) is optional in GOTO statements.   GO[TO] statement.label [:]   E  
GROUP function Use the GROUP function to return one or more substrings located between specified delimiters in string.   GROUP (string, delimiter, occurrence [,num.substr] )   E  
GROUPSTORE statement Use the GROUPSTORE statement to modify character strings by inserting, deleting, or replacing fields separated by specified delimiters.   GROUPSTORE new.string IN string USING start, n [,delimiter]   E  
GTS function Use the GTS function to test if elements of one dynamic array are greater than elements of another dynamic array.   GTS (array1, array2)    
HEADING statement Use the HEADING statement to specify the text and format of the heading to print at the top of each page of output.   HEADING [ON print.channel] heading
HEADINGE [ON print.channel] heading
HEADINGN [ON print.channel] heading  
EN  
HUSH statement Use the HUSH statement to suppress the display of all output normally sent to a terminal during processing. HUSH also suppresses output to a COMO file or TANDEM display.   HUSH {ON | OFF | expression} [SETTING status]   E  
ICHECK function Use the ICHECK function to check if data you intend to write to an SQL table violates any SQL integrity constraints. ICHECK verifies that specified data and primary keys satisfy the defined SQL integrity constraints for an SQL table.   ICHECK ( dynamic.array [, file.variable] , key [, column#] )    
ICONV function Use the ICONV function to convert string to a specified internal storage format. string is an expression that evaluates to the string to be converted.   ICONV (string, conversion)   E  
ICONVS function Use the ICONVS function to convert each element of dynamic.array to a specified internal storage format.   ICONVS (dynamic.array, conversion)    
IF statement Use the IF statement to determine program flow based on the evaluation of expression. If the value of expression is true, the THEN statements are executed. If the value of expression is false, the THEN statements are ignored and the ELSE statements are executed. If expression is the null value, expression evaluates to false. If no ELSE statements are present, program execution continues with the next executable statement.   IF expression {THEN statements [ELSE statements] | ELSE
statements}  
E  
IF Operator The IF operator lets you indicate a value conditional upon the truth of another value. The IF operator has the following syntax:      
IFS function Use the IFS function to return a dynamic array whose elements are chosen individually from one of two dynamic arrays based on the contents of a third dynamic array.   IFS (dynamic.array, true.array, false.array)    
ILPROMPT function Use the ILPROMPT function to evaluate a string containing UniVerse in-line prompts.   ILPROMPT (in.line.prompt)   E  
INCLUDE statement Use the INCLUDE statement to direct the compiler to insert the source code in the record program and compile it along with the main program. The INCLUDE statement differs from the $CHAIN statement in that the compiler returns to the main program and continues compiling with the statement following the INCLUDE statement.   INCLUDE [filename] program   E  
INDEX function Use the INDEX function to return the starting character position for the specified occurrence of substring in string.   INDEX (string, substring, occurrence)   E  
INDEXS function Use the INDEXS function to return a dynamic array of the starting column positions for a specified occurrence of a substring in each element of dynamic.array.   INDEXS (dynamic.array, substring, occurrence)    
INDICES function Use the INDICES function to return information about the secondary key indexes in a file.   INDICES (file.variable [,indexname])    
INMAT function Use the INMAT function to return the number of array elements that have been loaded after the execution of a MATREAD, MATREADL, MATREADU, or MATPARSE statement, or to return the modulo of a file after the execution of an OPEN statement. You can also use the INMAT function after a DIM statement to determine whether the DIM statement failed due to lack of available memory. If a preceding DIM statement fails, INMAT returns a value of 1.   INMAT ( [array] )   E  
INPUT statement Use the INPUT statement to halt program execution and prompt the user to enter a response. Data entered at the terminal or supplied by a DATA statement in response to an INPUT statement is assigned to variable. Input supplied by a DATA statement is echoed to the terminal. If the response is a RETURN with no preceding data, an empty string is assigned to variable.   INPUT variable [,length] [:] [_]   E  
INPUTCLEAR statement Use the INPUTCLEAR statement to clear the type-ahead buffer. You can use this statement before input prompts so input is not affected by unwanted characters.   INPUTCLEAR   E  
INPUTDISP statement Use the INPUTDISP statement with an @ expression to position the cursor at a specified location and define a format for the variable to print. The current contents of variable are displayed as the value in the defined field. Note that calculations are based on display length rather than character length.   INPUTDISP [@(col, row) [, | :]] variable [format]   E  
INPUTDP statement In NLS mode, use the INPUTDP statement to let the user enter data. The INPUTDP statement is similar to the INPUT, INPUTIF, and INPUTDISP statements, but it calculates display lengths rather than character lengths.   INPUTDP variable [, length] [:] [_] [THEN statements]
[ELSE statements]  
 
INPUTERR statement Use the INPUTERR statement to print a formatted error message on the bottom line of the terminal. error.message is an expression that evaluates to the error message text. The message is cleared by the next INPUT statement or is overwritten by the next INPUTERR or PRINTERR statement. INPUTERR clears the type-ahead buffer.   INPUTERR [error.message]    
INPUTIF statement Use the INPUTIF statement to assign the contents of the type- ahead buffer to a variable. For details, see the INPUT statement.      
INPUTNULL statement Use the INPUTNULL statement to define a character to be recognized as an empty string when it is input in response to an INPUT statement. If the only input to the INPUT statement is character, that character is recognized as an empty string. character replaces the default value of the INPUT variable with an empty string. If character evaluates to the null value, the INPUTNULL statement fails and the program terminates with a run-time error message.   INPUTNULL character   N  
INPUTTRAP statement Use the INPUTTRAP statement to branch to a program label or subroutine when a trap character is input. Execution is passed to the statement label which corresponds to the trap number of the trap character. If the trap number is larger than the number of labels, execution is passed to the statement specified by the last label in the list.   INPUTTRAP [trap.chars] {GOTO | GOSUB} label [,label ...]    
INS statement Use the INS statement to insert a new field, value, or subvalue into the specified dynamic.array.   INS expression BEFORE dynamic.array < field# [,value#
[,subvalue#]] >  
E  
INSERT function Use the INSERT function to return a dynamic array that has a new field, value, or subvalue inserted into the specified dynamic array.   INSERT (dynamic.array, field#, value#, subvalue#, expression)   E  
INT function Use the INT function to return the integer portion of an expression.   INT (expression)   E  
ISNULL function Use the ISNULL function to test whether a variable is the null value. If variable is the null value, 1 (true) is returned, otherwise 0 (false) is returned. This is the only way to test for the null value since the null value is not equal to any value, including itself.   ISNULL (variable)   E  
ISNULLS function Use the ISNULLS function to test whether any element of dynamic.array is the null value. A dynamic array is returned, each of whose elements is either 1 (true) or 0 (false). If an element in dynamic.array is the null value, 1 is returned, otherwise 0 is returned. This is the only way to test for the null value since the null value is not equal to any value, including itself.   ISNULLS (dynamic.array)   E  
ITYPE function Use the ITYPE function to return the value resulting from the evaluation of an I-descriptor expression in a UniVerse file dictionary.   ITYPE (i.type)   E  
KEYEDIT statement Use the KEYEDIT statement to assign specific keyboard keys to the editing functions of the INPUT @ statement, and to the !EDIT.INPUT and !GET.KEY subroutines. KEYEDIT supports the following editing functions:   KEYEDIT (function, key) [, (function, key)] ...    
KEYEXIT statement Use the KEYEXIT statement to specify exit traps for the keys assigned specific functions by the KEYEDIT statement. When an exit trap key is typed, the variable being edited with the INPUT @ statement or the !EDIT.INPUT subroutine remains in its last edited state. Use the KEYTRAP statement to restore the variable to its initial state.   KEYEXIT (value, key) [, (value, key)] ...   E  
KEYIN function Use the KEYIN function to read a single character from the input buffer and return it. All UniVerse special character handling (such as case inversion, erase, kill, and so on) is disabled. UNIX special character handling (processing of interrupts, XON/XOFF, conversion of CR to LF, and so on) still takes place.   KEYIN ( )    
KEYTRAP statement Use the KEYTRAP statement to specify traps for the keys assigned specific functions by the KEYEDIT statement. When a trap key is typed, the variable being edited with the INPUT @ statement or the !EDIT.INPUT subroutine is restored to its initial state. Use the KEYEXIT statement to leave the variable in its last edited state.   KEYTRAP (value, key) [, (value, key)] ...   E  
LEFT function Use the LEFT function to extract a substring comprising the first n characters of a string, without specifying the starting character position. It is equivalent to the following substring extraction operation:   LEFT (string, n)   E  
LEN function Use the LEN function to return the number of characters in string. Note that calculations are based on character length rather than display length.   LEN (string)   E  
LENDP function In NLS mode, use the LENDP function to return the number of display positions occupied by string when using the specified map. Calculations are based on display length rather than character length.   LENDP (string, [,mapname] )    
LENS function Use the LENS function to return a dynamic array of the number of display positions in each element of dynamic.array. Calculations are based on character length rather than display length.   LENS (dynamic.array)    
LENSDP function In NLS mode, use the LENSDP function to return a dynamic array of the number of display positions occupied by each element of dynamic.array. Note that calculations are based on display length rather than character length.   LENSDP (dynamic.array, [, mapname] )    
LES function Use the LES function to test if elements of one dynamic array are less than or equal to the elements of another dynamic array.   LES (array1, array2)    
LET statement Use the LET statement to assign the value of expression to variable. See "assignment statements" for more information about assigning values to variables.   [LET] variable = expression   E  
LN function Use the LN function to calculate the natural logarithm of the value of an expression, using base "e". The value of "e" is approximately 2.71828. expression must evaluate to a numeric value greater than 0.   LN (expression)   E  
LOCALEINFO function In NLS mode, use the LOCALEINFO function to retrieve the settings of the current locale.   LOCALEINFO (categories)   E  
LOCATE statement Use a LOCATE statement to search dynamic.array for expression and to return a value indicating one of the following:   (IDEAL, REALITY)   E  
LOCK statement Use the LOCK statement to protect specified user-defined resources or events against unauthorized use or simultaneous data file access by different users.   LOCK expression [THEN statements] [ELSE statements]   EN  
Logical Operators Numeric data, string data, and the null value can function as logical data. Numeric and string data can have a logical value of true or false. The numeric value 0 (zero), is false; all other numeric values are true. Character string data other than an empty string is true; an empty string is false. The null value is neither true nor false. It has the special logical value of null.     N  
LOOP statement Use the LOOP statement to start a LOOP...REPEAT program loop. A program loop is a series of statements that executes for a specified number of repetitions or until specified conditions are met.   LOOP
[loop.statements]
[CONTINUE]
[{WHILE | UNTIL} expression [DO]]
[loop.statements]
[CONTINUE]
REPEAT  
E  
LOWER function Use the LOWER function to return a value equal to expression, except that system delimiters which appear in expression are converted to the next lower-level delimiter: field marks are changed to value marks, value marks are changed to subvalue marks, and so on. If expression evaluates to the null value, null is returned.   LOWER (expression)   E  
LTS function Use the LTS function to test if elements of one dynamic array are less than elements of another dynamic array.   LTS (array1, array2)    
MAT statement Use the MAT statement to assign one value to all of the elements in the array or to assign all the values of one array to the values of another array.   MAT array = expression
MAT array1 = MAT array2  
N  
MATBUILD statement Use the MATBUILD statement to build a dynamic array from a dimensioned array.   MATBUILD dynamic.array FROM array [,start [,end]] [USING
delimiter]  
 
MATCH operator Use the MATCH operator or its synonym MATCHES to compare a string expression with a pattern.   string MATCH[ES] pattern    
MATCHFIELD function Use the MATCHFIELD function to check a string against a match pattern (see the MATCH operator for information about pattern matching).   MATCHFIELD (string, pattern, field)   E  
MATPARSE statement Use the MATPARSE statement to separate the fields of dynamic.array into consecutive elements of array.   MATPARSE array FROM dynamic.array [,delimiter]   E  
MATREAD statement Use the MATREAD statement to assign the contents of the fields of a record from a UniVerse file to consecutive elements of array. The first field of the record becomes the first element of array, the second field of the record becomes the second element of array, and so on. The array must be named and dimensioned in a DIMENSION or COMMON statement before it is used in this statement.   MATREAD array FROM [file.variable,] record.ID [ON ERROR
statements] {THEN statements [ELSE statements]
| ELSE statements}  
E  
MATREADL statement Use the MATREADL statement to set a shared record lock and perform the MATREAD statement. For details, see the MATREAD statement.      
MATREADU statement Use the MATREADU statement to set an update record lock and perform the MATREAD statement. For details, see the MATREAD statement.      
MATWRITE statement Use the MATWRITE statement to write data from the elements of a dimensioned array to a record in a UniVerse file. The elements of array replace any data stored in the record. MATWRITE strips any trailing empty fields from the record.   MATWRITE[U] array ON | TO [file.variable,] record.ID
[ON ERROR statements] [LOCKED statements]
[THEN statements] [ELSE statements]  
E  
MATWRITEU statement Use the MATWRITEU statement to maintain an update record lock and perform the MATWRITE statement. For details, see the MATWRITE statement.      
MAXIMUM function Use the MAXIMUM function to return the element with the highest numeric value in dynamic.array. Nonnumeric values, except the null value, are treated as 0. If dynamic.array evaluates to the null value, null is returned. Any element that is the null value is ignored, unless all elements of dynamic.array are null, in which case null is returned.   MAXIMUM (dynamic.array)   E  
MINIMUM function Use the MINIMUM function to return the element with the lowest numeric value in dynamic.array. Nonnumeric values, except the null value, are treated as 0. If dynamic.array evaluates to the null value, null is returned. Any element that is the null value is ignored, unless all elements of dynamic.array are null, in which case null is returned.   MINIMUM (dynamic.array)   E  
MOD function Use the MOD function to calculate the value of the remainder after integer division is performed on the dividend expression by the divisor expression.   MOD (dividend, divisor)   E  
MODS function Use the MODS function to create a dynamic array of the remainder after the integer division of corresponding elements of two dynamic arrays.   MODS (array1, array2)   E  
MULS function Use the MULS function to create a dynamic array of the element-by-element multiplication of two dynamic arrays.   MULS (array1, array2)   E  
NAP statement Use the NAP statement to suspend the execution of a BASIC program, pausing for a specified number of milliseconds.   NAP [milliseconds]    
NEG function Use the NEG function to return the arithmetic inverse of the value of the argument.   NEG (number)   E  
NEGS function Use the NEGS function to return the negative values of all the elements in a dynamic array. If the value of an element is negative, the returned value is positive. If dynamic.array evaluates to the null value, null is returned. If any element is null, null is returned for that element.   NEGS (dynamic.array)    
NES function Use the NES function to test if elements of one dynamic array are equal to the elements of another dynamic array.   NES (array1, array2)    
NEXT statement Use the NEXT statement to end a FOR...NEXT loop, causing the program to branch back to the FOR statement and execute the statements that follow it.   NEXT [variable]   E  
NOBUF statement Use the NOBUF statement to turn off buffering for a file previously opened for sequential processing. Normally UniVerse uses buffering for sequential input and output operations. The NOBUF statement turns off this buffering and causes all writes to the file to be performed immediately. It eliminates the need for FLUSH operations but also eliminates the benefits of buffering. The NOBUF statement must be executed after a successful OPENSEQ or CREATE statement and before any input or output operation is perfo rmed on the record.   NOBUF file.variable {THEN statements [ELSE statements]
| ELSE statements}  
E  
NOT function Use the NOT function to return the logical complement of the value of expression. If the value of expression is true, the NOT function returns a value of false (0). If the value of expression is false, the NOT function returns a value of true (1).   NOT (expression)   E  
NOTS function Use the NOTS function to return a dynamic array of the logical complements of each element of dynamic.array. If the value of the element is true, the NOTS function returns a value of false (0) in the corresponding element of the returned array. If the value of the element is false, the NOTS function returns a value of true (1) in the corresponding element of the returned array.   NOTS (dynamic.array)   E  
NULL statement Use the NULL statement when a statement is required but no operation is to be performed. For example, you can use it with the ELSE clause if you do not want any operation performed when the ELSE clause is executed.   NULL   EN  
NUM function Use the NUM function to determine whether expression is a numeric or nonnumeric string. If expression is a number, a numeric string, or an empty string, it evaluates to true and a value of 1 is returned. If expression is a nonnumeric string, it evaluates to false and a value of 0 is returned.   NUM (expression)   E  
Numeric Data All numeric data is represented internally either as floating-point numbers with the full range of values supported by the system's floating-point implementation, or as integers. On most systems the range is from 10-307 through 10+307 with 15 decimal digits of precision.      
NUMS function Use the NUMS function to determine whether the elements of a dynamic array are numeric or nonnumeric strings. If an element is numeric, a numeric string, or an empty string, it evaluates to true, and a value of 1 is returned to the corresponding element in a new dynamic array. If the element is a nonnumeric string, it evaluates to false, and a value of 0 is returned.   NUMS (dynamic.array)    
OCONV function Use the OCONV function to convert string to a specified format for external output. The result is always a string expression.   OCONV (string, conversion)   E  
OCONVS function Use the OCONVS function to convert the elements of dynamic.array to a specified format for external output.   OCONVS (dynamic.array, conversion)    
ON statement Use the ON statement to transfer program control to one of the internal subroutines named in the GOSUB clause or to one of the statements named in the GOTO clause.   ON expression GOSUB statement.label [:]
[,statement.label [:]...]  
E  
OPEN statement Use the OPEN statement to open a UniVerse file for use by BASIC programs. All file references in a BASIC program must be preceded by either an OPEN statement or an OPENCHECK statement for that file. You can open several UniVerse files at the same point in a program, but you must use a separate OPEN statement for each file.   OPEN [dict,] filename [TO file.variable]
[ON ERROR statements] {THEN statements [ELSE statements]
| ELSE statements}  
E  
OPENCHECK statement Use the OPENCHECK statement to open an SQL table for use by BASIC programs, enforcing SQL integrity checking. All file references in a BASIC program must be preceded by either an OPENCHECK statement or an OPEN statement for that file.   OPENCHECK [dict,] filename [TO file.variable]
{THEN statements [ELSE statements] | ELSE statements}  
 
OPENDEV statement Use the OPENDEV statement to open a device for sequential processing. OPENDEV also sets a record lock on the opened device or file. See the READSEQ and WRITESEQ statements for more details on sequential processing.   OPENDEV device TO file.variable [LOCKED statements]
{THEN statements [ELSE statements] | ELSE statements}  
E  
OPENPATH statement The OPENPATH statement is similar to the OPEN statement, except that the pathname of the file is specified. This file is opened without reference to the VOC file. The file must be a hashed UniVerse file or a directory (UniVerse types 1 and 19).   OPENPATH pathname [TO file.variable] [ON ERROR statements]
{THEN statements [ELSE statements] | ELSE statements}  
E  
OPENSEQ statement Use the OPENSEQ statement to open a file for sequential processing. All sequential file references in a BASIC program must be preceded by an OPENSEQ or OPENDEV statement for that file. Although you can open several files for sequential processing at the same point in the program, you must issue a separate OPENSEQ statement for each. See the READSEQ and WRITESEQ statements for more details on sequential processing.   OPENSEQ filename, record.ID TO file.variable [USING
dynamic.array] [ON ERROR statements] [LOCKED statements]
{THEN statements [ELSE statements] | ELSE statements}  
EN  
ORS function Use the ORS function to create a dynamic array of the logical OR of corresponding elements of two dynamic arrays.   ORS (array1, array2)   E  
PAGE statement Use the PAGE statement to print headings, footings, and page advances at the appropriate places on the specified output device. You can specify headings and footings before execution of the PAGE statement (see the HEADING and FOOTING statements). If there is no heading or footing, PAGE clears the screen.   PAGE [ON print.channel] [page#]   E  
Pattern Matching Operators The pattern matching operator, MATCH, and its synonym, MATCHES, compare a string expression to a pattern. The syntax for a pattern match expression is:      
PERFORM statement Use the PERFORM statement to execute a UniVerse sentence, paragraph, menu, or command from within the BASIC program, then return execution to the statement following the PERFORM statement. The commands are executed in the same environment as the BASIC program that called them; that is, unnamed common variables, @variables, and in-line prompts retain their values, and select lists and the DATA stack remain active. If these values change, the new values are passed back to the calling program.   PERFORM command   E  
PRECISION statement Use the PRECISION statement to control the maximum number of decimal places that are output when the system converts a numeric value from internal binary format to an ASCII character string value.   PRECISION expression   E  
PRINT statement Use the PRINT statement to send data to the screen, a line printer, or another print file.   PRINT [ON print.channel] [print.list]   E  
PRINTER statement Use the PRINTER statement to direct output either to the screen or to a printer. By default, all output is sent to the screen unless a PRINTER ON is executed or the P option to the RUN command is used. See the SETPTR command for more details about redirecting output.   PRINTER {ON | OFF | RESET}   EN  
PRINTERR statement Use the PRINTERR statement to print a formatted error message on the bottom line of the terminal. The message is cleared by the next INPUT statement or is overwritten by the next PRINTERR or INPUTERR statement. PRINTERR clears the type-ahead buffer.   PRINTERR [error.message]    
PROCREAD statement Use the PROCREAD statement to assign the contents of the primary input buffer to a variable. Your BASIC program must be called by a proc. If your program was not called from a proc, the ELSE statements are executed; otherwise the THEN statements are executed.   PROCREAD variable {THEN statements [ELSE statements]
| ELSE statements}  
 
PROCWRITE statement Use the PROCWRITE statement to write string to the primary input buffer. Your program must be called by a proc.   PROCWRITE string    
PROGRAM statement Use the PROGRAM statement to identify a program. The PROGRAM statement is optional; if you use it, it must be the first noncomment line in the program.   PROG[RAM] [name]   E  
PROMPT statement Use the PROMPT statement to specify the character to be displayed on the screen when user input is required. If no PROMPT statement is issued, the default prompt character is the question mark (?).   PROMPT character   E  
PWR function Use the PWR function to return the value of expression raised to the power specified by power.   PWR (expression, power)   E  
QUOTE function Use the QUOTE function to enclose an expression in double quotation marks. If expression evaluates to the null value, null is returned, without quotation marks.   QUOTE (expression)   E  
RAISE function Use the RAISE function to return a value equal to expression, except that system delimiters in expression are converted to the next higher-level delimiter: value marks are changed to field marks, subvalue marks are changed to value marks, and so on. If expression evaluates to the null value, null is returned.   RAISE (expression)   E  
RANDOMIZE statement Use the RANDOMIZE statement with an expression to make the RND function generate the same sequence of random numbers each time the program is run. If no expression is supplied, or if expression evaluates to the null value, the internal time of day is used (the null value is ignored). In these cases the sequence is different each time the program is run.   RANDOMIZE (expression)   E  
READ statements Use READ statements to assign the contents of a record from a UniVerse file to dynamic.array.   READ dynamic.array FROM [file.variable,] record.ID
[ON ERROR statements] {THEN statements
[ELSE statements] | ELSE statements}  
E  
READBLK statement Use the READBLK statement to read a block of data of a specified length from a file opened for sequential processing and assign it to a variable. The READBLK statement reads a block of data beginning at the current position in the file and continuing for blocksize bytes and assigns it to variable. The current position is reset to just beyond the last byte read.   READBLK variable FROM file.variable, blocksize
{THEN statements [ELSE statements] | ELSE statements}  
EN  
READL statement Use the READL statement to acquire a shared record lock and perform the READ statement. For details, see the READ statement.      
READLIST statement Use the READLIST statement to read the remainder of an active select list into a dynamic array.   READLIST dynamic.array [FROM list.number]
{THEN statements [ELSE statements] | ELSE statements}  
 
READNEXT statement Use the READNEXT statement to assign the next record ID from an active select list to dynamic.array.   READNEXT dynamic.array [,value [,subvalue]] [FROM list]
{THEN statements [ELSE statements] | ELSE statements}  
E  
READSEQ statement Use the READSEQ statement to read a line of data from a file opened for sequential processing. Sequential processing lets you process data one line at a time. UniVerse keeps a pointer at the current position in the file. The OPENSEQ statement sets this pointer to the first byte of the file, and it is advanced by READSEQ, READBLK, WRITESEQ, and WRITEBLK statements.   READSEQ variable FROM file.variable [ON ERROR statements]
{THEN statements [ELSE statements] | ELSE statements}  
E  
READT statement Use the READT statement to read the next tape record from a magnetic tape unit and assign its contents to a variable.   READT [UNIT (mtu)] variable
{THEN statements [ELSE statements] | ELSE statements}  
E  
READU statement Use the READU statement to set an update record lock and perform the READ statement. For details, see the READ statement.      
READV statement Use the READV statement to read the contents of a specified field of a record in a UniVerse file. For details, see the READ statement.      
READVL statement Use the READVL statement to set a shared record lock and perform the READV statement. For details, see the READ statement.      
READVU statement Use the READVU statement to set an update record lock and read the contents of a specified field of a record in a UniVerse file. For details, see the READ statement.      
REAL function Use the REAL function to convert number into a floating-point number without loss of accuracy. If number evaluates to the null value, null is returned.   REAL (number)    
RECORDLOCK statements Use RECORDLOCK statements to acquire a record lock on a record without reading the record.   RECORDLOCKL file.variable, record.ID [ON ERROR statements]
[LOCKED statements]  
E  
RECORDLOCKED function Use the RECORDLOCKED function to return the status of a record lock.   RECORDLOCKED (file.variable, record.ID)   E  
Relational Operators Relational operators compare numeric, character string, or logical data. The result of the comparison, either true (1) or false (0), can be used to make a decision regarding program flow (see the IF statement). The following table lists the relational operators.     N  
RELEASE statement Use the RELEASE statement to unlock, or release, locks set by a FILELOCK, MATREADL, MATREADU, READL, READU, READVL, READVU, and OPENSEQ statement. These statements lock designated records to prevent concurrent updating by other users. If you do not explicitly release a lock that you have set, it is unlocked automatically when the program terminates.   RELEASE [file.variable [,record.ID]] [ON ERROR statements]   E  
REM statement Use the REM statement to insert a comment in a BASIC program. Comments explain or document various parts of a program. They are part of the source code only and are nonexecutable. They do not affect the size of the object code.   REM [comment.text]   E  
REM function Use the REM function to calculate the remainder after integer division is performed on the dividend expression by the divisor expression.   REM (dividend, divisor)   E  
REMOVE statement Use the REMOVE statement to successively extract dynamic array elements that are separated by system delimiters. When a system delimiter is encountered, the extracted element is assigned to element. The REMOVE statement is more efficient than the EXTRACT function for extracting successive fields, values, and so on, for multivalue list processing.   REMOVE element FROM dynamic.array SETTING variable   E  
REMOVE function Use the REMOVE function to successively extract and return dynamic array elements that are separated by system delimiters, and to indicate which system delimiter was found. When a system delimiter is encountered, the value of the extracted element is returned. The REMOVE function is more efficient than the EXTRACT function for extracting successive fields, values, and so on, for multivalue list processing.   REMOVE (dynamic.array, variable)   E  
REPEAT statement The REPEAT statement is a loop-controlling statement. For syntax details, see the LOOP statement.      
REPLACE function Use the REPLACE function to return a copy of a dynamic array with the specified field, value, or subvalue replaced with new data.   REPLACE (expression, field#, value#, subvalue# {, | ;}
replacement)  
E  
RETURN statement Use the RETURN statement to terminate a subroutine and return control to the calling program or statement.   RETURN [TO statement.label]   EN  
RETURN (value) statement Use the RETURN (value) statement to return a value from a user-written function.   RETURN (expression)    
REUSE function Use the REUSE function to specify that the value of the last field, value, or subvalue be reused in a dynamic array operation.   REUSE (expression)   E  
REVREMOVE statement Use the REVREMOVE statement to successively extract dynamic array elements that are separated by system delimiters. The elements are extracted from right to left, in the opposite order from those extracted by the REMOVE statement. When a system delimiter is encountered, the extracted element is assigned to element.   REVREMOVE element FROM dynamic.array SETTING variable   E  
REWIND statement Use the REWIND statement to rewind a magnetic tape to the beginning-of-tape position.   REWIND [UNIT (mtu)]
{THEN statements [ELSE statements] | ELSE statements}  
E  
RIGHT function Use the RIGHT function to extract a substring comprising the last n characters of a string. It is equivalent to the following substring extraction operation:   RIGHT (string, n)   E  
RND function Use the RND function to generate any positive or negative random integer or 0.   RND (expression)   E  
ROLLBACK statement Use the ROLLBACK statement to cancel all file I/O changes made during a transaction. The WORK keyword provides compatibility with SQL syntax conventions; it is ignored by the compiler.   ROLLBACK [WORK] [THEN statements] [ELSE statements]   E  
RPC.CALL function Use the RPC.CALL function to make requests of a connected server. The request is packaged and sent to the server using the C client RPC library. RPC.CALL returns the results of processing the remote request: 1 for success, 0 for failure.   RPC.CALL (connection.ID, procedure, #args, MAT arg.list,
#values, MAT return.list)  
E  
RPC.CONNECT function Use the RPC.CONNECT function to establish a connection to a server process. Once the host and server are identified, the local uniVerse/Net daemon tries to connect to the remote server. If the attempt succeeds, RPC.CONNECT returns a connection ID. If it fails, RPC.CONNECT returns 0. The connection ID is a nonzero integer used to refer to the server in subsequent calls to RPC.CALL and RPC.DISCONNECT.   RPC.CONNECT (host, server)   E  
RPC.DISCONNECT function Use the RPC.DISCONNECT function to end an RPC session.   RPC.DISCONNECT (connection.ID)   E  
SADD function Use the SADD function to add two string numbers and return the result as a string number. You can use this function in any expression where a string or string number is valid, but not necessarily where a standard number is valid, because string numbers can exceed the range of numbers that standard arithmetic operators can handle.   SADD (string.number.1, string.number.2)   E  
SCMP function Use the SCMP function to compare two string numbers and return one of the following three numbers: -1 (less than), 0 (equal), or 1 (greater than). If string.number.1 is less than string.number.2, the result is -1. If they are equal, the result is 0. If string.number.1 is greater than string.number.2, the result is 1. You can use this function in any expression where a string or string number is valid.   SCMP (string.number.1, string.number.2)   E  
SDIV function Use the SDIV function to divide string.number.1 by string.number.2 and return the result as a string number. You can use this function in any expression where a string or string number is valid, but not necessarily where a standard number is valid, because string numbers can exceed the range of numbers which standard arithmetic operators can handle. Either string number can be a valid number or a string number.   SDIV (string.number.1, string.number.2 [,precision])   E  
SEEK statement Use the SEEK statement to move the file pointer by an offset specified in bytes, relative to the current position, the beginning of the file, or the end of the file.   SEEK file.variable [, offset [, relto]]
{THEN statements [ELSE statements] | ELSE statements}  
E  
SEEK(ARG.) statement Use the SEEK(ARG.) statement to move the command line argument pointer to the next command line argument from left to right, or to a command line argument specified by arg#. The command line is delimited by blanks, and the first argument is assumed to be the first word after the program name. When a cataloged program is invoked, the argument list starts with the second word in the command line.   SEEK(ARG. [,arg#] ) [THEN statements] [ELSE statements]   E  
SELECT statement Use a SELECT statement to create a numbered select list of record IDs from a UniVerse file or a dynamic array. A subsequent READNEXT statement can access this select list, removing one record ID at a time from the list. READNEXT instructions can begin processing the select list immediately.   SELECT [variable] [TO list.number] [ON ERROR statements]
SELECTN [variable] [TO list.number] [ON ERROR statements]
SELECTV [variable] TO list.variable [ON ERROR statements]  
E  
Select List Variables Select list variables are created by a form of the SELECT statement. A select list variable contains a select list and can be used only in READNEXT statements. Unlike other variables, a select list variable cannot be an element of a dimensioned array.      
SELECTE statement Use the SELECTE statement to assign the contents of select list 0 to list.variable. list.variable is activated in place of select list 0 and can be read with the READNEXT statement.   SELECTE TO list.variable    
SELECTINDEX statement Use the SELECTINDEX statement to create select lists from secondary indexes.   SELECTINDEX index [,alt.key] FROM file.variable [TO
list.number]  
E  
SELECTINFO function Use the SELECTINFO function to determine whether a select list is active, or to determine the number of items it contains.   SELECTINFO (list, key)   E  
SEND function Use the SEND statement to write a block of data to a device. The SEND statement can be used to write data to a device that has been opened for I/O using the OPENDEV or OPENSEQ statement.   SEND output.expr [:] TO device
{THEN statements [ELSE statements] | ELSE statements}  
E  
SENTENCE function Use the SENTENCE function to return the stored sentence that invoked the current process. Although the SENTENCE function uses no arguments, parentheses are required to identify it as a function. The SENTENCE function is a synonym for the @SENTENCE system variable.   SENTENCE ( )   E  
SEQ function Use the SEQ function to convert an ASCII character to its numeric string equivalent.   SEQ (expression)   E  
SEQS function Use the SEQS function to convert a dynamic array of ASCII characters to their numeric string equivalents.   SEQS (dynamic.array)   E  
SET TRANSACTION ISOLATION LEVEL statement Use the SET TRANSACTION ISOLATION LEVEL statement to set the default transaction isolation level you need for your program.   SET TRANSACTION ISOLATION LEVEL level   EN  
SETLOCALE function In NLS mode, use the SETLOCALE function to enable or disable a locale for a specified category or change its setting.   SETLOCALE (category, value)   E  
SETREM statement Use the SETREM statement to set the remove pointer in dynamic.array to the position specified by position.   SETREM position ON dynamic.array   E  
SIN function Use the SIN function to return the trigonometric sine of an expression. expression represents the angle expressed in degrees. Numbers greater than 1E17 produce a warning message, and 0 is returned. If expression evaluates to the null value, null is returned.   SIN (expression)   E  
SINH function Use the SINH function to return the hyperbolic sine of expression. expression must be numeric and represents the angle expressed in degrees. If expression evaluates to the null value, null is returned.   SINH (expression)   E  
SLEEP function Use the SLEEP statement to suspend execution of a BASIC program, pausing for a specified number of seconds.   SLEEP [seconds]   E  
SMUL function Use the SMUL function to multiply two string numbers and return the result as a string number. You can use this function in any expression where a string or string number is valid, but not necessarily where a standard number is valid, because string numbers can exceed the range of numbers that standard arithmetic operators can handle.   SMUL (string.number.1, string.number.2)   E  
SOUNDEX function The SOUNDEX function evaluates expression and returns the most significant letter in the input string followed by a phonetic code. Nonalphabetic characters are ignored. If expression evaluates to the null value, null is returned.   SOUNDEX (expression)   E  
SPACE function Use the SPACE function to return a string composed of blank spaces. expression specifies the number of spaces in the string. If expression evaluates to the null value, the SPACE function fails and the program terminates with a run-time error message.   SPACE (expression)   E  
SPACES function Use the SPACES function to return a dynamic array with elements composed of blank spaces. dynamic.array specifies the number of spaces in each element. If dynamic.array or any element of dynamic.array evaluates to the null value, the SPACES function fails and the program terminates with a run- time error message.   SPACES (dynamic.array)    
SPLICE function Use the SPLICE function to create a dynamic array of the element-by-element concatenation of two dynamic arrays, separating concatenated elements by the value of expression.   SPLICE (array1, expression, array2)   E  
SQRT function Use the SQRT function to return the square root of expression. The expression must evaluate to a numeric value that is greater than or equal to 0. If expression evaluates to a negative value, the result of the function is SQRT(-n) and an error message is printed. If expression evaluates to the null value, null is returned.   SQRT (expression)   E  
SQUOTE function Use the SQUOTE function to enclose an expression in single quotation marks. If expression evaluates to the null value, null is returned, without quotation marks.   SQUOTE (expression )   E  
SSELECT statement Use an SSELECT statement to create a numbered select list of record IDs in sorted order from a UniVerse file or a dynamic array. You can then access this select list by a subsequent READNEXT statement which removes one record ID at a time from the list.   SSELECT [variable] [TO list.number] [ON ERROR statements]
SSELECTN [variable] [TO list.number] [ON ERROR statements]
SSELECTV [variable] TO list.variable [ON ERROR statements]  
E  
SSUB function Use the SSUB function to subtract string.number.2 from string.number.1 and return the result as a string number. You can use this function in any expression where a string or string number is valid, but not necessarily where a standard number is valid, because string numbers can exceed the range of numbers that standard arithmetic operators can handle.   SSUB (string.number.1, string.number.2)   E  
STATUS statement Use the STATUS statement to determine the status of an open file. The STATUS statement returns the file status as a dynamic array and assigns it to dynamic.array.   STATUS dynamic.array FROM file.variable
{THEN statements [ELSE statements] | ELSE statements}  
E  
STATUS function Use the STATUS function to determine the results of the operations performed by certain statements and functions.   STATUS ( )   E  
STOP statement Use the STOP statement to terminate program execution and return system control to the calling environment, which can be a menu, a paragraph, another BASIC program, or the UniVerse command processor.   STOP [expression]
STOPE [expression]
STOPM [expression]  
E  
STORAGE statement The STORAGE statement performs no function. It is provided for compatibility with other Pick systems.   STORAGE arg1 arg2 arg3    
STR function Use the STR function to produce a specified number of repetitions of a particular character string.   STR (string, repeat)   E  
String Operators The concatenation operator ( : or CAT) links string expressions to form compound string expressions, as follows:      
STRS function Use the STRS function to produce a dynamic array containing the specified number of repetitions of each element of dynamic.array.   STRS (dynamic.array, repeat)   E  
SUBR function Use the SUBR function to return the value of an external subroutine. The SUBR function is commonly used in I- descriptors.   SUBR (name, [argument [,argument...]] )   E  
SUBROUTINE statement Use the SUBROUTINE statement to identify an external subroutine. The SUBROUTINE statement must be the first noncomment line in the subroutine. Each external subroutine can contain only one SUBROUTINE statement.   SUBROUTINE [name] [( [MAT] variable [, [MAT] variable...] )]   E  
SUBS function Use the SUBS function to create a dynamic array of the element-by-element subtraction of two dynamic arrays.   SUBS (array1, array2)   E  
Substring Operator A substring is a subset of contiguous characters of a character string. For example, JAMES is a substring of the string JAMES JONES. JAMES JON is also a substring of JAMES JONES.      
SUBSTRINGS function Use the SUBSTRINGS function to create a dynamic array each of whose elements are substrings of the corresponding elements of dynamic.array.   SUBSTRINGS (dynamic.array, start, length)   E  
SUM function Use the SUM function to calculate the sum of numeric data. Only elements at the lowest delimiter level of a dynamic array are summed. The total is returned as a single element at the next highest delimiter level.   SUM (dynamic.array)   E  
SUMMATION function Use the SUMMATION function to return the sum of all the elements in dynamic.array. Nonnumeric values, except the null value, are treated as 0.   SUMMATION (dynamic.array)   E  
SYSTEM function Use the SYSTEM function to check on the status of a system function. Use the SYSTEM function to test whether NLS is on when you run a program, and to display information about NLS settings.   SYSTEM (expression)   E  
TABSTOP statement Use the TABSTOP statement to set the current tabstop width for PRINT statements. The initial tabstop setting is 10.   TABSTOP expression   E  
TAN function Use the TAN function to return the trigonometric tangent of expression. expression represents an angle expressed in degrees.   TAN (expression)   E  
TANH function Use the TANH function to return the hyperbolic tangent of expression. expression must be numeric and represents the angle expressed in degrees. If expression evaluates to the null value, null is returned.   TANH (expression)   E  
TERMINFO function Use the TERMINFO function to access the device-independent terminal handler string defined for the current terminal type. The TERMINFO function returns a dynamic array containing the terminal characteristics for the terminal type set by TERM or SET.TERM.TYPE.   TERMINFO (argument)   E  
TIME function Use the TIME function to return a string value expressing the internal time of day. The internal time is the number of seconds that have passed since midnight to the nearest thousandth of a second (local time).   TIME ( )   E  
TIMEDATE function Use the TIMEDATE function to return the current system time and date in the following format:   TIMEDATE ( )   E  
TIMEOUT statement Use the TIMEOUT statement to terminate a READSEQ or READBLK statement if no data is read in the specified time. You can also use the TIMEOUT statement to set a time limit for a uniVerse/Net link. Use the TTYGET and TTYSET statements to set a timeout value for a file open on a serial communications port.   TIMEOUT {file.variable | link.number}, time   E  
TPARM function Use the TPARM function to evaluate a parameterized terminfo string.   TPARM (terminfo.string, [arg1], [arg2], [arg3], [arg4],
[arg5], [arg6], [arg7], [arg8] )  
 
TPRINT statement Use the TPRINT statement to send data to the screen, a line printer, or another print file. TPRINT is similar to the PRINT statement, except that TPRINT lets you specify time delay expressions in the print list.   TPRINT [ON print.channel] [print.list]   E  
TRANS function Use the TRANS function to return the contents of a field or a record in a UniVerse file. TRANS opens the file, reads the record, and extracts the specified data.   TRANS ([DICT] filename, record.ID, field#, control.code)   E  
TRANSACTION ABORT function Use the TRANSACTION ABORT statement to cancel all file I/O changes made during a transaction.   TRANSACTION ABORT   E  
TRANSACTION COMMIT statement Use the TRANSACTION COMMIT statement to commit all file I/O changes made during a transaction.   TRANSACTION COMMIT
{THEN statements [ELSE statements] | ELSE statements}  
 
TRANSACTION START statement Use the TRANSACTION START statement to begin a new transaction.   TRANSACTION START
{THEN statements [ELSE statements] | ELSE statements}  
 
TRIM function Use the TRIM function to remove unwanted characters in expression. If only expression is specified, multiple occurrences of spaces and tabs are reduced to a single tab or space, and all leading and trailing spaces and tabs are removed.   TRIM (expression [,character [,option]] )   E  
TRIMB function Use the TRIMB function to remove all trailing spaces and tabs from expression. All other spaces or tabs in expression are left intact. If expression evaluates to the null value, null is returned.   TRIMB (expression)   E  
TRIMBS function Use the TRIMBS function to remove all trailing spaces and tabs from each element of dynamic.array.   TRIMBS (dynamic.array)    
TRIMF function Use the TRIMF function to remove all leading spaces and tabs from expression. All other spaces or tabs in expression are left intact. If expression evaluates to the null value, null is returned.   TRIMF (expression)   E  
TRIMFS function Use the TRIMFS function to remove all leading spaces and tabs from each element of dynamic.array.   TRIMFS (dynamic.array)    
TRIMS function Use the TRIMS function to remove unwanted spaces and tabs from each element of dynamic.array.   TRIMS (dynamic.array)    
TTYCTL statement Use the TTYCTL statement to set terminal device characteristics on Berkeley terminal drivers. code# specifies the action to take.   TTYCTL file.variable, code#
{THEN statements [ELSE statements] | ELSE statements}  
E  
TTYGET statement Use the TTYGET statement to assign the characteristics of a terminal, line printer channel, or tape unit as a dynamic array to variable. If the FROM clause is omitted, a dynamic array of the terminal characteristics for your terminal is assigned to variable.   TTYGET variable [FROM {file.variable | LPTR [n] | MTU [n]}]
{THEN statements [ELSE statements] | ELSE statements}  
 
TTYSET statement Use the TTYSET statement to set the characteristics of a terminal, line printer channel, or tape unit. If only dynamic.array is specified, the terminal characteristics for your terminal are set based on the contents of dynamic.array. dynamic.array is a dynamic array of eleven fields, each of which has multiple values. A description of the expected contents of each value of dynamic.array is given in the TTYGET statement.   TTYSET dynamic.array [ON {file.variable | LPTR [n] |
MTU [n]}] {THEN statements [ELSE statements]
| ELSE statements}  
 
UNASSIGNED function Use the UNASSIGNED function to determine if variable is unassigned. UNASSIGNED returns 1 (true) if variable is unassigned. It returns 0 (false) if variable is assigned a value, including the null value.   UNASSIGNED (variable)   E  
UNICHAR function Use the UNICHAR function to generate a single character from a Unicode value.   UNICHAR (unicode)   N  
UNICHARS statement Use the UNICHARS function to generate a dynamic array of characters from a dynamic array of Unicode values.   UNICHARS (dynamic.array)   N  
UNISEQ statement Use the UNISEQ function to generate a Unicode value from expression.   UNISEQ (expression)    
UNISEQS statement Use the UNISEQS function to generate an array of Unicode values from a dynamic array of characters.   UNISEQS (dynamic.array)    
UNLOCKstatement Use the UNLOCK statement to release a process lock set by the LOCK statement.   UNLOCK [expression]   E  
UPCASE function Use the UPCASE function to change all lowercase letters in expression to uppercase. If expression evaluates to the null value, null is returned.   UPCASE (expression)   E  
UPRINT statement In NLS mode, use the UPRINT statement to print data that was mapped to an external format using OCONV mapname. The UPRINT statement subsequently sends the mapped data to the screen, a line printer, or another print file with no further mapping.   UPRINT [ON print.channel] [print.list]    
Unknown Data: The Null Value The null value has a special run-time data type in UniVerse BASIC. It was added to UniVerse BASIC for compatibility with UniVerse SQL. The null value represents data whose value is unknown.     N  
Variables Variables are symbolic names that represent stored data values. The value of a variable can be:      
WEOF statement Use the WEOF statement to write an end-of-file (EOF) mark to tape.   WEOF [UNIT (mtu)] {THEN statements [ELSE statements]
| ELSE statements}  
E  
WEOFSEQ statement Use the WEOFSEQ statement to write an end-of-file (EOF) mark in a file opened for sequential access. The end-of-file mark is written at the current position and has the effect of truncating the file at this point. Any subsequent READSEQ statement has its ELSE statements executed.   WEOFSEQ file.variable [ON ERROR statements]   EN  
WRITE statements Use WRITE statements to write new data to a record in a UniVerse file. The value of expression replaces any data previously stored in the record.   WRITE[U] expression {ON | TO} [file.variable,] record.ID
[ON ERROR statements] [LOCKED statements]
[THEN statements] [ELSE statements]  
E  
WRITEBLK statement Use the WRITEBLK statement to write a block of data to a file opened for sequential processing. Each WRITEBLK statement writes the value of expression starting at the current position in the file. The current position is incremented to beyond the last byte written. WRITEBLK does not add a newline at the end of the data.   WRITEBLK expression ON file.variable
{THEN statements [ELSE statements] | ELSE statements}  
EN  
WRITELIST statement Use the WRITELIST statement to save a list as a record in the &SAVEDLISTS& file.   WRITELIST dynamic.array ON listname    
WRITESEQ statement Use the WRITESEQ statement to write new lines to a file opened for sequential processing. UniVerse keeps a pointer to the current position in the file while it is open for sequential processing. The OPENSEQ statement sets this pointer to the first byte of the file, and it is advanced by the READSEQ, READBLK, WRITESEQ, and WRITEBLK statements.   WRITESEQ expression {ON | TO} file.variable [ON ERROR
statements] {THEN statements [ELSE statements]
| ELSE statements}  
E  
WRITESEQF statement Use the WRITESEQF statement to write new lines to a file opened for sequential processing, and to ensure that data is physically written to disk (that is, not buffered) before the next statement in the program is executed. The sequential file must be open, and the end-of-file marker must be reached before you can write to the file. You can use the FILEINFO function to determine the number of the line about to be written.   WRITESEQF expression {ON | TO} file.variable [ON ERROR
statements] {THEN statements [ELSE statements]
| ELSE statements}  
E  
WRITET statement Use the WRITET statement to write a tape record on a magnetic tape. The value of variable becomes the next tape record. variable is an expression that evaluates to the text to be written to tape.   WRITET [UNIT (mtu)] variable
{THEN statements [ELSE statements] | ELSE statements}  
EN  
WRITEU statement Use the WRITEU statement to maintain an update record lock while performing the WRITE statement. For details, see the WRITE statement.      
WRITEV statement Use the WRITEV statement to write on the contents of a specified field of a record of a UniVerse file. For details, see the WRITE statement.      
WRITEVU statement Use the WRITEVU statement to maintain an update record lock while writing on the contents of a specified field of a record of a UniVerse file. For details, see the WRITE statement.      
XLATE function Use the XLATE function to return the contents of a field or a record in a UniVerse file. XLATE opens the file, reads the record, and extracts the specified data.   XLATE ([DICT] filename, record.ID, field#, control.code)   E  
XTD function Use the XTD function to convert a string of hexadecimal characters to an integer. If string evaluates to the null value, null is returned.   XTD (string)   E  
[ ] operator Use the [ ] operator (square brackets) to extract a substring from a character string. The larger bold brackets are part of the syntax and must be typed.   expression [[start,] length]
expression [delimiter, occurrence, fields]  
E  
assignment statements Use assignment statements to assign a value to a variable. The variable can be currently unassigned (that is, one that has not been assigned a value by an assignment statement, a READ statement, or any other statement that assigns values to variables) or have an old value that is to be replaced. The assigned value can be a constant or an expression. It can be any data type (that is, numeric, character string, or the null value).   variable = expression
variable += expression
variable -= expression
variable := expression  
E  
transaction statements Use transaction statements to treat a sequence of file I/O operations as one logical operation with respect to recovery and visibility to other users. These operations can include file I/O operations or subtransactions.   BEGIN TRANSACTION
[statements]
{COMMIT [WORK] | ROLLBACK [WORK]}
[statements]
[{COMMIT [WORK] | ROLLBACK [WORK]}
[statements]
.
.
.]
END TRANSACTION  
N  

All documents copyright by their respective owners.