BASIC Functions

The following BASIC functions are presented:

@() Function

Provides a standard means of performing control functions on a wide array of terminals.

abs() Function

Returns the absolute (positive) portion of the integer number derived from the given numeric expression.

access() Function

Provides data about the AQL or Update Processor environments when the program is called from a dictionary.

alpha() Function

Evaluates the expression and returns 1 (true) if every character in the string is alphabetical (that is, a—z upper and lowercase), or 0 (false) if any character is nonalphabetical.

ascii() Function

Converts a string of EBCDIC-encoded characters into their equivalent ASCII values.

assigned() Function

Determines if the variable has been assigned a value.

change() Function

searches a string expression for the search string and then replaces the string with a specified replacement string.

char() Function

Converts a number between 0 and 255 to its corresponding ASCII character equivalent.

col1() Function

Returns the numeric column position of the character immediately preceding the substring retrieved in the most recently executed field() function.

col2() Function

Returns the numeric column position of the character following the substring retrieved in the most recently executed field() function.

convert() Function

Searches a given variable and replaces each occurrence of a character by another.

cos() Function

Calculates the trigonometric cosine of an angle of a specified numeric expression in the range 0 to 360 degrees.

count() Function

Returns the number of occurrences of string expressions within another string expression.

date() Function

Returns the current system date in internal format as an integer number representing the number of days that have elapsed since December 31, 1967 (day 0 on the D3 calendar).

dcount() Function

Returns the number of occurrences of the delimiter specified in a spring expression within another spring expression, plus one.

delete() Function

Removes a specific attribute, value, or subvalue from a dimensioned or dynamic array.

dquote() Function

Extracts a double-quoted string from a specified string expression.

dtx() Function

Converts a given decimal number to its corresponding hexadecimal equivalent. The number is first converted to an integer by truncating the fractional part.

ebcdic() Function

Converts a string of ASCII-encoded characters into their equivalent EBCDIC values.

ereplace() Function

Searches a string expression for the search string and then replaces the search string with a specified replacement string for the amount of specified occurrences.

error() Function

Retrieves the TCL command used to activate the program and loads it into a specified variable.

exchange() Function

Replaces the characters specified in a string expression with the characters specified in another specified string expression.

exp() Function

Returns the exponential of a numeric expression, that is, base e, which is 2.718281828 rounded to precision to the power of the numeric expression.

extract() Function

Retrieves a specific attribute, value, or subvalue from a dimensioned or dynamic array.

field() Function

Returns a substring from a string expression, by specifying a delimiter and the desired occurrence.

fmt() Function

Identical to performing a FlashBASIC or BASIC mask.

fold() Function

Folds a string expression into a string of a given length.

iconv() Function

Converts a value from its external format to its internal equivalent, according to the processing code being applied.

index() Function

Searches through a given string expression for the occurrence of a specified character or substring and, if found, returns the numeric position where the nth occurrence of the substring begins.

inmat() Function

Returns information about arrays.

insert() Function

Inserts the element referenced by a specified string expression into a specific attribute, value, or subvalue location in a specified dynamic array.

int() Function

Returns the numeric integer equivalent from a given expression.

len() Function

Returns the length of a string expression.

ln() Function

Returns the natural logarithm (base e, which is 2.718281828 rounded to precision) of a given numeric expression.

locate() Function

A variant of the locate statement. See the locate Statement documentation.

maximum() Function

Returns the maximum of a list of numbers delimited by attribute, value, or subvalue marks.

minimum() Function

Returns the minimum of a list of numbers delimited by attribute, value, or subvalue marks.

mod() Function

Returns the remainder portion of the result of dividing one number by another.

not() Function

Returns the logical inverse of the normal outcome of true and false generated by a logical expression.

num() Function

Evaluates an expression and returns 1 (true) if it is a decimal numeric. Otherwise, it returns 0, if the expression contains any nonnumeric characters.

occurs() Function

Searches a string for attributes or values that occur consecutively.

oconv() Function

Converts a value from its internal format to its external equivalent, according to the processing code being applied.

oconvs() Function

Performs conversions within an eval expression.

pwr() Function

Raises a value contained in an expression to the power of the value of a second expression.

rem() Function

Returns the remainder portion of the result of dividing one number by another.

replace() Function

Inserts or replaces a specific attribute, value, or subvalue in the string referenced by a specified dynamic array expression with the value referenced in a specified string expression.

rnd() Function

Generates a random number.

scan() Function

Searches through a specified string expression for the first occurrence of up to three user-definable characters specified by search delimiters in addition to the system delimiters value, subvalue, and attribute.

sentence() Function

Identical to performing a tclread statement. It returns the TCL command used to activate the program into a variable.

seq() Function

Converts any ASCII character to its corresponding numeric equivalent in the range 0 through 255.

sin() Function

Calculates the sine of an angle specified in degrees.

sort() Function

Sorts an attribute or value mark delimited string expression in ascending order.

soundex() Function

Returns the 4-digit soundex code for a phonetic string expression.

space() Function

Generates a string of spaces of a length equal to the value of the numeric expression.

sqrt() Function

Calculates the square root of a given numeric expression.

squote() Function

Extracts a single-quoted string from a specified string expression.

status() Function

Returns the value of system(0).

str() Function

Repeats a specified string expression the number of times specified in a specified numeric expression.

sum() Function

Returns the sum of a list of numbers delimited by attribute, value, or subvalue marks.

summation() Function

Returns the sum of a list of numbers delimited by attribute, value, or subvalue marks.

swap() Function

Searches a string expression for the search string and then replaces the string with another specified string for a specified number of occurrences.

system() Function

Provides an interface to a number of system variables, depending upon the requested numeric argument.

tan() Function

Calculates the trigonometric tangent of the angle specified in degrees.

time() Function

Returns the current system time in its internal format, representing the number of seconds past midnight.

timedate() Function

Returns the current system time and date in external format (hh:mm:ss dd mmm yyyy).

trans() Function

Performs translates within an eval expression.

trim() Function

Removes leading, trailing, and/or redundant characters from a string.

trimb() Function

Removes trailing spaces from a string.

trimf() Function

Removes leading spaces from a string.

xtd() Function

Converts an expression from its hexadecimal format into its equivalent decimal format.