Vtech PreComputer Power Pad Plus User Manual - Page 67

Print, Read And Data

Page 67 highlights

NEW NEW erases all program lines from the active program area. PRINT Line # PRINT expression and/or character string The PRINT statement is used to produce output on the display panel. The PRINT command will print one or several items - either expressions or strings. Each item in the list should be separated by a comma or a semicolon. Example: 80 PRINT NAME$; "IS COMING" 230 PRINT "SUM="; A+B+C READ AND DATA When it is necessary to enter a lot of information or data into the computer, using the INPUT statement can be very time consuming. To help out, use the READ and DATA commands. Example: 10 DATA 10,60,70,80,90 20 READ A,B,C,D,E 30 PRINT A;B;C;D;E RUN 10 60 70 80 90 The READ statement consists of a list of variable names with commas between each variable. The DATA statement consists of a list of expressions separated by commas. These expressions can be either numeric or strings. The READ statement makes the computer look up the value of its variables from the DATA statement. When the computer goes to READ first it will assign the first expression from the DATA list. The next time it goes to READ it will assign the second value and so on. If the READ runs out of DATA you will get "? OUT OF DATA ERROR." 63

  • 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

63
NEW
NEW
erases all program lines from the active program area.
PRINT
Line #
PRINT
expression and/or character string
The
PRINT
statement is used to produce output on the display panel.
The
PRINT
command
will print one or several items - either expressions or strings.
Each item in the list should
be separated by a comma or a semicolon.
Example:
80
PRINT NAME$; “IS COMING”
230
PRINT “SUM=”; A+B+C
READ AND DATA
When it is necessary to enter a lot of information or data into the computer, using the
INPUT
statement can be very time consuming.
To help out, use the
READ
and
DATA
commands.
Example:
10
DATA 10,60,70,80,90
20
READ A,B,C,D,E
30
PRINT A;B;C;D;E
RUN
10 60 70 80 90
The
READ
statement consists of a list of variable names with commas between each
variable.
The
DATA
statement consists of a list of expressions separated by commas.
These
expressions can be either numeric or strings.
The
READ
statement makes the computer
look up the value of its variables from the
DATA
statement.
When the computer goes
to
READ
first it will assign the first expression from the
DATA
list.
The next time it goes
to
READ
it will assign the second value and so on.
If the
READ
runs out of
DATA
you
will get “
?
OUT OF DATA ERROR
.”