Rockwell-automation 1747-PBASE BASIC Development Software Programming Uživatelský manuál Strana 86

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 144
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 85
Publication 1746-PM001A-US-P
6-14 Writing Programs Using the BASIC Development Language
Figure 6.1
Second Program, After Translation (SECOND.BAS)
0 REM...
10 REM SECOND PROGRAM
20 P. CHR(27),”[40M”,
30 P. CHR(27),”[1M”,
40 P. CHR(27),”[33M”,
50 P. CHR(27),”[2J”,
60 P.
70 P. TAB(10),”
80 P. TAB(10),” WARNING
90 P. TAB(10),” Use of this machine is restricted
100 P. TAB(10),”
110 P.
120 P. “Hit any key to continue . . .”,
130 If (EOF) THEN GOTO 130
140 PUSH A
150 A=GET
160 POP A
170 P.
180 P. CHR(27),”[2J”,
190 P. “Enter your Operator Number”
200 IF (EOF) THEN GOTO 200
210 OP=GET
220 IF OP=49 THEN GOTO 270
230 IF OP=50 THEN GOTO 320
240 P. CHR(27), “[2J”,
250 P. “Invalid Entry . . Operator number not recognized”
260 GOTO 190
270 CALL 46
280 POP D1
290 POP M1
300 POP Y1
310 GOTO 360
320 CALL 46
330 POP D2
340 POP M2
350 POP Y2
360 P. CHR(27),”[2J”,
370 P. CHR(27),”[11B”,
380 PUSH A
390 CALL 46
400 POP A
410 P. A,”:”,
420 POP A
430 P. A,”:”,
440 POP A
450 P. A,” “,
460 POP A
470 P. “Operator #”, OP-48,” acknowledged”
480 END
If you do not have any errors, the message BASIC translator Version x.xx appears
in the message line after the translation is complete. If you have errors, correct
them and translate the program again. For details on translating programs and
finding translation errors refer to Chapter 8.
Zobrazit stránku 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 143 144

Komentáře k této Příručce

Žádné komentáře