Vtech PreComputer Power Pad Plus User Manual - Page 58

Graphics Function, Substrings

Page 58 highlights

VAL VAL works like STR$ but in reverse. It changes a string argument into a number. Look at the following short program. Example: 10 A$="33" 20 B$="20" 30 C=VAL(A$+B$) 40 D= VAL (A$) + VAL (B$) 50 PRINT C;D RUN 3320 53 GRAPHICS FUNCTION PGET function Returns the color attribute of a specified pixel. PGET(X, Y) = n n Returns 1 the current coordinates(X, Y) turns the pixel status ON 0 the current coordinates(X, Y) turns the pixel status OFF SUBSTRINGS It is also possible to get substrings of strings. A substring is a part of a string. For example: "ABC" is a substring of "ABCDE". The following three functions operate on substrings. LEFT$ (A$,N) This will return the substring from the left-most of string A$, the first character to the Nth character. 54

  • 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

54
VAL
VAL works like STR$ but in reverse.
It changes a string argument into a number.
Look
at the following short program.
Example:
10
A$=“33”
20
B$=“20”
30
C=VAL(A$+B$)
40
D= VAL (A$) + VAL (B$)
50
PRINT C;D
RUN
3320
53
GRAPHICS FUNCTION
PGET
function
Returns the color attribute of a specified pixel.
PGET(X, Y) = n
n
Returns
1
the current coordinates(X, Y) turns the pixel status ON
0
the current coordinates(X, Y) turns the pixel status OFF
SUBSTRINGS
It is also possible to get substrings of strings.
A substring is a part of a string.
For example:
“ABC” is a substring of “ABCDE”.
The following three functions operate on substrings.
LEFT$ (A$,N)
This will return the substring from the left-most of string A$, the first character to the Nth
character.