
7-6
Section
Details of BASIC Commands
165
int
Syntax:
INT
(<numerical expression>)
Description:
Function Returns the truncated integer part of a numerical expression.
<numerical expression> may be any integer, single-precision floating point or double-precision
floating point.
The return type is integer.
INT
returns the largest integer value that is less than or equal to the argument.
Remarks:
Note:
1.
If the value of the argument is positive
INT
returns the same value as
FIX
, if the
value of the argument is negative
INT
returns a value 1 less than
FIX
.
2.
Refer to Precautions on Real Numbers in 7-4-4 Constants.
Examples:
> 10 A = INT(6.1)
> 20 B = INT(6.9)
> 30 C = INT(-6.1)
> 40 D = INT(-6.9)
> 50 PRINT A,B,C,D
> RUN
6
6
-7
-7
See also:
FIX
intrb
Syntax:
INTRB
Description:
System Variable. Stores the number of the line that was executing when the interrupt occurred.
Remarks:
INTRB
is a read-only system variable; it cannot be assigned a value.
The value of
INTRB
is the line number of the line that was executing when an interrupt occurred.
The
INTRB
function returns the line number where the program branch occurred when the
interrupt was generated and execution branched to the interrupt subroutine.
Examples:
> 10 ON KEY 1 GOSUB 1000
> 20 KEY ON
> 30 GOTO 30
> 1000 PRINT “YOU PRESSED A KEY”
> 1010 PRINT “THE BASIC LINE NUMBER THAT WAS INTERRUPTED BY THIS
ROUTINE IS LINE “; INTRB
> 1020 RETURN
See also:
INTRR
,
INTRS
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...