Sharp OZ-707 Operation Manual - Page 111

expres~ion

Page 111 highlights

RND p o FORMAT: RND numeric expression Abbreviation: RN. See Also: RANDOMIZE PURPOSE: Generates a random number. REMARKS: If the value of the expression is less than 1 but greater than or equal teoxpzreerso~itohne random number is less than is an integer greater than or 1 and greater equal to 1, the than zero. result is a If the random number greater than or equal to 1 and less than or equal to the expression. If the expression is greater than or equal to 1 and not an integer, the result is a random number greater than or equal to 1 and less than or equal to the smallest integer that is larger than the expression. (In this case, the generation of !he rand~m number changes depending on the value of the decimal portion of the . argument.) If the expression is negative, the previously set numeric expression is used to generate the random number. Argumer:!.! .5 2 2.5 Result L,?wer ~oun~ Upp~~o~nd 0<

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128

RND
FORMAT:
RND numeric expression
Abbreviation:
RN.
See
Also:
RANDOMIZE
PURPOSE:
Generates a random number.
REMARKS:
p
o
If the value of the expression is less than 1 but greater than or equal
to zero the random number
is
less than 1 and greater than zero. If the
expres~ion
is
an
integer greater than or equal to
1,
the result is a
random number greater than or equal to
1
and less than or equal to
the expression. If the expression is greater than or equal to
1
and not
an
integer, the result
is
a random number greater than or equal to
1
and less than or equal to the smallest integer that is larger than the
expression. (In this case, the generation of !he
rand~m
number
changes depending on the value of the decimal portion of the
.
argument.) If the expression is negative, the previously set numeric
expression is used
to
generate the random number.
Argumer:!.!
.5
2
2.5
--
---------
--
Result
------------
L,?wer
~oun~
Upp~~o~nd
0<
< 1
1
2
3
The same sequence of random numbers
is
normally generated
because the same "seed" is used each time the power
is
turned on. To
randomize the seed, see the RANDOMIZE command.
210
RUN
FORMAT:
1.
RUN
I
ENTER
I
2
RUN
{line number}
I
ENTER
I
.
*Iabel
Abbreviation:
R.
See
Also:
GOTO, ARUN
PURPOSE:
Executes a program
in
memory.
REMARKS:
Format
1
executes a program beginning with the lowest numbered
statement
in
memory.
Format
2
executes a program beginning with the specified line number.
An error occurs if the specified line number or *label was not found.
If
two or more identical labels exist in a program, the one with a
smaller line number
is
executed.
211
o