Remote-processing BASIC 52 Uživatelský manuál Strana 106

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 163
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 105
RPBASIC-52 PROGRAMMING GUIDE
2-87
POP
Syntax: POP variable [ ,variable,...]
Function: Takes a valu e PU SHed to a sta ck and assigns it to the variable.
Mode: Command, run
Use: POP X,Y,Z
Cards: All
DESCRIPTION
Multiple variables can be POPped off the stack by separating the variables with commas. The first value
POPped is the last value PUSHed.
POP and PUSH are useful for transferring data values between subroutines. They allow you to write a
subroutine with arbitrary variable names. Data transfers to and from the subroutine can be performed by
PUSH and POP, rather than by equating variable nam es.
RELATED
PUSH, LD@, ST@
ERROR
A-STACK No variable on the stack when the POP instruction executed.
EXAMPLE
100 FOR N=0 TO 7
110 PUSH AIN(N)
120 NEXT
130 FOR N=0 TO 7
140 POP A
150 PRINT A*.00214
160 NEXT
>run
0
0
0
0
0
.536
3.445
2.334
Zobrazit stránku 105
1 2 ... 101 102 103 104 105 106 107 108 109 110 111 ... 162 163

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

Žádné komentáře