Fix; Fn; For - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

FIX
F I X ( <numeric expression> )
PRINT FIX(9.99999)
9
FUNCTION: Removes the part of <numeric expression> to the right of the decimal
point, rounding towards zero.
Associated keywords: C I N T, I N T, R 0 U N D
FN
(See DE F F N)
FOR
FOR <simple variable>
=
<start> TO <end> [S T E P .<size>]
10 FOR n=2 TO 8 STEP 2
20 PRINT n;
30 NEXT n
40 PRINT ",who do we appreciate?"
run
COMMAND: Carries out the body of program between the FOR and N EX T
commands, a given number of times, stepping the control variable between a <start>
and <end> value. Ifthe S
T
E P <size> is not specified, 1 is assumed.
The S T E P <size> may be specified as a negative <numeric expression> in which case
the value of the <start> parameter must be greater than that of the <end> parameter,
otherwise the control variable will not be stepped.
FOR N EX T loops may be 'nested', i.e. one may be carried out within another, within
another, and so on.
Assigning the variable's name to the NE X T command is optional as BASIC will
automatically find which FOR command is to be associated with an 'anonymous'
NEXT.
Associated keywords: NE X T , S T E P, TO
Chapter 3 Page 28
Complete List of Keywords

Advertisement

Table of Contents
loading

Table of Contents

Save PDF