Sharp PC-1403 Operation Manual page 172

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

166
When
run
from
line
20,
the value of
X i
s based on the standard
seed.
When
run from
line
10,
a
new
seed
i
s used.
10 RANDOM
20 X=RND 10
Examples
•1
Mi
When
random numbers
are generated
using the
RND
functi
o
n,
the COMPUTER
begins with a
predetermined
"seed"
or
starting
number.
The RANDOM verb
resets
this
seed
to
a new randomly
determined
value.
The starting seed will
be the same
each time the COMPUTER
is turned
on, so the
sequence of random numbers
generated with RND
i
s
the
same
each time,
unless
the
seed
is changed.
This
is
very convenient
during the
development
of
a program
because it
means
that
the
behavior
of
the program shoul
d be the same
each
time it is
run, even though
it includes an
RND
function. When you want
to have the numbers be
truly
random,
the RANDOM
statement
can
be
used
to make
the seed
itself
random.
•M•H.t.Mi
The RANDOM verb
is
used
to reset the
seed
for
random
number generation.
1 RANDOM
Abbreviations:
RA.,
RAN.,
RAND.,
RANDO.
Verbs
RANDOM

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents