Sharp OZ-707 Operation Manual - Page 117

FORMA, Abbreviation, PURPOSE, REMARKS, EXAMPLE, FORMAT

Page 117 highlights

VAL p o FORMA T: VAL string Abbreviation: V. See Also: STR$ PURPOSE: Converts a string of numeric characters into a decimal value. REMARKS: The VAL function converts a character string, which may include the hex number designator (&H), numbers (0-9), a sign (+, -), and exponential symbols (E or D), into a numeric value. If the string is in decimal notation, it must be composed of the characters 0 to 9, with an optional decimal point and sign. In this form, VAL is the opposite of the STR$ function. If illegal characters are included, conversion is performed up to the first occurrence of an illegal character. Control codes (&HOO to &H1 F) cannot be used. EXAMPLE: A=VAL"-120" B=VAL"3.2*4=" C=VAL "&H64" Assigns -120 to variable A. Assigns 3.2 to variable B. Assigns 100 to variable C. WAIT p o FORMAT: 1. WAIT expression 2. WAIT Abbreviation: W. See Also: PRINT, GPRINT PURPOSE: Controls the length of time that displayed information is shown before program execution continues. REMARKS: Format 1 specifies the time in which execution of the PRINT command halts. The program temporarily halts for the specified time interval, then automatically restarts. The value of the expression may be set to any value from 0 to 65535. A value of 1 as the expression corresponds to an interval of approx. 1/59 sec. The power-on default for the value of the expression is zero. The WAIT command is valid for all the PRINT or GPRINT commands used in the program. To set an infinite interval, use format 2. Note: The WAIT command is not available on personal computers in general. On PCs, the FOR. ..NEXT statement is used for wait time control as follows: 50: FOR J=1 TO 500:NEXT J 222 223

  • 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

VAL
FORMA
T:
VAL string
Abbreviation:
V.
See
Also:
STR$
PURPOSE:
Converts a string of numeric characters into a decimal value.
REMARKS:
The VAL function converts a character string, which may include the
hex number designator (&H), numbers (0-9), a sign
(+,
-),
and
exponential symbols (E
or
D), into a numeric value.
If the string is
in
decimal notation, it must be composed of the
characters 0 to
9,
with an optional decimal point and sign. In this form,
VAL is the opposite of the STR$ function.
p
o
If illegal characters are included, conversion is performed up to the first
occurrence of
an
illegal character.
Control codes
(&HOO
to
&H1
F)
cannot be used.
EXAMPLE:
A=VAL"-120"
Assigns
-120
to variable
A.
B=VAL"3.2*4="
Assigns 3.2 to variable B.
C=VAL"&H64"
Assigns 100 to variable
C.
222
WAIT
FORMAT:
1.
WAIT expression
2. WAIT
Abbreviation:
W.
See
Also:
PRINT, GPRINT
PURPOSE:
Controls the length of time that displayed information is shown before
program execution continues.
REMARKS:
p
o
Format 1 specifies the time
in
which execution of the PRINT command
halts. The program temporarily halts for the specified time interval, then
automatically restarts.
The value of the expression may
be
set to any value from 0 to 65535.
A value of 1 as the expression corresponds to an interval of approx.
1/59 sec. The power-on default for the value of the expression is zero.
The WAIT command is valid for all the PRINT or GPRINT commands
used
in
the program. To set an infinite interval, use format
2.
Note:
The WAIT command is not available on personal computers
in
general.
On PCs, the FOR.
..
NEXT statement is used for wait time control as
follows:
50: FOR
J=1
TO
500:NEXT J
223