Remote-processing CAMBASIC Uživatelský manuál Strana 88

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 208
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 87
Commands - 55
GOTO
Statement
SYNTAX: GOTO line/label
PURPOSE: To branch unconditionally out of the norm al progr am sequence to a specified line number or label.
REMARK S: If line is the line number of an executable statement, that statement and those following are executed.
If it is a non-executable statem ent (such as a r emark), execution continues at the first executable
statement encountered after line.
The GOTO statement can be used in Im mediate M ode to reenter a pr ogram at a desired point. This
can be useful in debugging.
NOTE: The execution time of the GOTO statement is independent of the location of the target line in the program. There
is no runtime search.
EXAMPLE: 10 PRINT"line 10"
20 PRINT"line 20"
RUN
line 10
line 20
GOTO 20
line 20
The following is an exam ple using line/labels:
10 ..start
20 PRINT "at start"
30 GOTO ..here
40 ..there
50 PRINT "over there"
60 END
70 ..here
80 PRINT "over here"
90 GOTO ..there
RUN
at start
over here
over there
NOTE: When a label is used with GOTO, a statement cannot follow GOTO on the same line.
ERROR: < Can’t compile> if the line/label does not exist
Zobrazit stránku 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 207 208

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

Žádné komentáře