VTech Power Pad Precomputer Power Pad Plus User Manual page 54

Vtech precomputer power pad plus user's manual
Table of Contents

Advertisement

SOUND
This is a command to generate a sound note.
SOUND consists of two functions: frequency and duration
frequency The frequency of the sound in hertz; a value in the range
0 < frequency parameter < 256
duration
The number of the system clock ticks so the sound lasts; a value in the range
0 < duration parameter < 256
FOR ... TO ...
Line#
FOR variable = initial value TO final value STEP stepsize (optional)
Line#
Line#
Line#
Line#
NEXT variable
The FOR ...
NEXT statement repeats a task a set number of times without having to
rewrite it. All statements between the FOR and NEXT command are repeated based on
the initial value, the final value and the stepsize.
is not used, it is assumed to be 1.
Example:
60
FOR ITEMS=1 TO 20
70
INPUT PRICE
80
SUM=PRICE+SUM
90
NEXT ITEMS
RUN
FUNCTION
A function is a mathematical procedure which when applied to a certain value will give
a new value. We call the value in brackets ( ), the argument, and the new value, the
result.
Example:
SQR is a square root function.
STEP ...
NEXT
If the STEP portion of the command
50

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents