ASCII Function

Converts a string value from EBCDIC to ASCII.

Syntax

ASCII(expression)

Syntax Elements

expression is any valid DataBasic expression or any string, substring, or value; expressed as a variable name, a value, or a string enclosed in quotes.

Comment

This function is useful when reading EBCDIC format tapes with the READT statement.

Examples

READT X ELSE STOP
Y = ASCII(X)

Reads a record from the magnetic tape unit and assigns the value to variable X. Assigns ASCII value of record to variable Y.

A = "Z"
B = ASCII(A)
PRINT B

Assigns the ASCII value of variable A to variable B and prints B.