TYP
The TYP function returns a number that represents the type of the next
datum in a file. See Table 5-9 below.
Table 5-9. Numbers Representing File Data Types
--------------------------------------------------------------------------------------------
| | |
| TYP Result | Type of Next Item in File |
| | |
--------------------------------------------------------------------------------------------
| | |
| 0 | Unrecognized |
| | |
--------------------------------------------------------------------------------------------
| | |
| 1 | DECIMAL |
| | |
--------------------------------------------------------------------------------------------
| | |
| 2 | Entire string |
| | |
--------------------------------------------------------------------------------------------
| | |
| 3 | End-of-file (EOF) mark |
| | |
--------------------------------------------------------------------------------------------
| | |
| 4 | End-of-record (EOR) mark |
| | |
--------------------------------------------------------------------------------------------
| | |
| 5 | SHORT INTEGER |
| | |
--------------------------------------------------------------------------------------------
| | |
| 6 | SHORT DECIMAL |
| | |
--------------------------------------------------------------------------------------------
| | |
| 8 | Beginning of string |
| | |
--------------------------------------------------------------------------------------------
| | |
| 9 | Middle of string |
| | |
--------------------------------------------------------------------------------------------
| | |
| 10 | End of string |
| | |
--------------------------------------------------------------------------------------------
| | |
| 11 | INTEGER |
| | |
--------------------------------------------------------------------------------------------
| | |
| 12 | SHORT REAL |
| | |
--------------------------------------------------------------------------------------------
| | |
| 13 | REAL |
| | |
--------------------------------------------------------------------------------------------
Syntax
TYP(fnum)
Parameters
fnum The file number that HP Business BASIC/XL uses to
identify the file. It is a numeric expression that
evaluates to a positive short integer. Fnum must
specify a BASIC DATA file. An optional # can precede
fnum.
Examples
110 Type = TYP(2) !Type is type of next datum in file 2