Vtech PreComputer Power Pad Plus User Manual - Page 60

First, The Ascii Code, Table, Example, Chr$ N, Gosub, Return

Page 60 highlights

ASC(A$) The ASC statement will return the ASCII code, a code for representing alphanumeric information, for the FIRST character of the specified string. Brackets must enclose the string specified. Refer to the appendix of THE ASCII CODE TABLE (Page 72). For example, the ASCII decimal value of "X" is 88. If A$="XAB", then ASC (A$)=88. Example: 10 X=ASC("ROY") 20 PRINT X RUN 82 CHR$ (N) This statement works the opposite way as the ASC statement. The CHR$ statement will return the string character which corresponds to the given ASCII code. The argument may be any number from 32 to 127 or any variable expression with an integer value within that range. Brackets must be put around the argument. Example: 30 PRINT CHR$(68) RUN D GOSUB...RETURN Line# GOSUB first line number of subroutine. Line# Line# Line# Line# first line number of subroutine Line# Line# RETURN The GOSUB command tells the computer to GOTO another line number. After the process has been completed, a RETURN statement is used to send the computer back to the line immediately after the GOSUB. These statements are used to process a series of commands that are frequently used. 56

  • 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

56
ASC(A$)
The ASC statement will return the ASCII code, a code for representing alphanumeric
information, for the
FIRST
character of the specified string.
Brackets must enclose the
string specified.
Refer to the appendix of
THE ASCII CODE
TABLE
(Page 72).
For example,
the ASCII decimal value of “X” is 88.
If A$=“XAB”, then ASC (A$)=88.
Example:
10
X=ASC(“ROY”)
20
PRINT X
RUN
82
CHR$ (N)
This statement works the opposite way as the ASC statement.
The
CHR$
statement will
return the string character which corresponds to the given ASCII code.
The argument may
be any number from 32 to 127 or any variable expression with an integer value within
that range.
Brackets must be put around the argument.
Example:
30
PRINT CHR$(68)
RUN
D
GOSUB...RETURN
Line#
GOSUB
first line number of subroutine.
Line#
Line#
Line#
Line#
first line number of subroutine
Line#
Line#
RETURN
The
GOSUB
command tells the computer to
GOTO
another line number.
After the process
has been completed, a
RETURN
statement is used to send the computer back to the line
immediately after the
GOSUB
. These statements are used to process a series of commands
that are frequently used.