Previous | Contents | Index |
The EXIT statement lets you exit from a main program, a SUB, FUNCTION, or PICTURE subprogram, a multiline DEF, a statement block, or a handler.
DEF emp.bonus(A) IF A > 10 THEN PRINT "OUT OF RANGE" EXIT DEF 0 ELSE emp.bonus = A * 4 END IF END DEF INPUT A PRINT emp.bonus(A) END |
Output
? 11 OUT OF RANGE 0 |
The EXP function returns the value of the mathematical constant e raised to a specified power.
None
DECLARE SINGLE num_val num_val = EXP(4.6) PRINT num_val |
Output
99.4843 |
The EXTERNAL statement declares constants, variables, functions, and subroutines external to your program. You can describe parameters for external functions and subroutines.
EXTERNAL SUB allocate (LONG,ANY, ) |
EXTERNAL SUB queue(STRING, OPTIONAL STRING, LONG, ANY) |
EXTERNAL STRING FUNCTION new (DOUBLE, STRING DIM(,), DIM( )) |
!External Constant EXTERNAL LONG CONSTANT SS$_NORMAL |
!External Variable EXTERNAL WORD SYSNUM |
!External Function EXTERNAL DOUBLE FUNCTION USR$2(WORD,LONG,ANY) |
!External Subroutine EXTERNAL SUB calc BY DESC (STRING DIM(,), BYTE BY REF) |
The FIELD statement dynamically associates string variables with all or parts of a record buffer. FIELD statements do not move data. Instead, they permit direct access through string variables to sections of a specified record buffer.
The FIELD statement is supported only for compatibility with BASIC-PLUS-2. Because data defined in the FIELD statement can be accessed only as string data, you must use the CVTxx functions to process numeric data; therefore, you must convert string data to numeric after you move it from the record buffer. Then, after processing, you must convert numeric data back to string data before transferring it to the record buffer. It is recommended that you use the BASIC dynamic mapping feature or multiple maps instead of the FIELD statement and CVTxx functions. |
FIELD #1%, 1% AS A$, ASCII(A$) AS B$ |
FIELD #1%, 40% AS whole_field$ FIELD #1%, 10% AS A$, 10% AS B$, 10% AS C$, 10% AS D$ |
MAT array-name1 = array-name2 MAT array-name1 = NUL$ |
FIELD #8%, 2% AS U$, 2% AS CL$, 4% AS X$, 4% AS Y$ LSET U$ = CVT%$(U%) LSET CL$ = CVT%$(CL%) LSET X$ = CVTF$(X) LSET Y$ = CVTF$(Y) U% = CVT$%(U$) CL% = CVT$%(CL$) X = CVT$F(X$) Y = CVT$F(Y$) |
The FIND statement locates a specified record in a disk file and makes it the current record for a GET, UPDATE, or DELETE operation. FIND statements are valid on RMS sequential, relative, and indexed files.
Previous | Next | Contents | Index |