BASIC-SO

Functions

STR$

The STR$ function returns a string of decimal digits that represent the value of the integer expression.

STR$ (expression)

10 FOR 1=0 TO 9

20A$ = A$ + MID$ (STR$ (I), 2)

30NEXT 1

40PRINT A$ RUN 0123456789 Ok

TAB

The TAB function spaces to the specified column position at the terminal. The left- most column is 1 and the rightmost is the WIDTH value. If the current print posi- tion is beyond the specified column, TAB will force a carriage return, line feed before spacing to the specified column. This function may only be used with the PRINT statement. If the expression rounds to a value less than 1, TAB(1) results. If the expression rounds to over WIDTH value, TAB (expression MOD width) results.

TAB (expression)

10FOR 1= 1TO 4

20PRINT TAS (I); I

30 NEXT I

RUN

1

2

3

4

Ok

TAN

The TAN function returns the tangent value of the argument. The input is given in radians. The calculation is performed in single precision.

TAN (expression)

10 INPUT A

20 PRINT TAN (A)

30 END

RUN

?41

.160656 Ok

USRn

The USRn function is used to reference a user-defined assembly-language, PL/M-80or Fortran-80 subroutine. The DEFUSRn statement specifies the starting address for the corresponding USRn subroutine. The argument n may be any integer from 0 to 24; if no argument is given, 0 is assumed. The type character indicates the type of the result. If none is indicated, the result must be returned as an integer in registers Hand L.

7-13

Page 77
Image 77
Intel 9800758-02 manual STR$ expression, TAB expression, TAN expression