Remote-processing BASIC for the CX-10 Modbus Manuale Utente Pagina 49

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 84
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 48
BASIC PROGRAMMING GUIDE
2-40
POP
Syntax: POP
variable [,variable,...]
Function: Takes a value PUSHed to a stack and assigns it to the variable.
Mode: Command, run
Use: POP X,Y,Z
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 names.
RELATED
PUSH, LD@, ST@
ERROR
A-STACK No
variable
on the stack when the POP instruction executed.
EXAMPLE
100 FOR N=2 TO 7
110 PUSH REGREAD(n)
120 NEXT
130 FOR N=2 TO 7
140 POP A
150 PRINT A*.00214
160 NEXT
>run
0
0
0
0
0
.536
3.445
2.334
Vedere la pagina 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 83 84

Commenti su questo manuale

Nessun commento