Remote Processing Coorporation RPC-320 Specifiche Pagina 155

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 186
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 154
Commands - 125
On power–up, you have 100 bytes of string space. You can change this with the CLEAR statement.
(Beneath the string area is the stack).
Thus, unused RAM extends from the top of the array space to the bottom of the stack.
EXAMPLE 1: 10 A = 1.1
20 B = VARPTR(A)
30 PRINT B ;
40 FOR X = 0 TO 3
50 PRINT PEEK(B+X) ;
60 NEXT : PRINT
RUN
17487 205 204 12 129
This example is for a simple numeric variable. The first number printed is the address of the first
byte of the floating point representation of the number, or “1.1”. This is the same as shown on the
previous page.
EXAMPLE 2: 10 H(0) = 1.1
20 Z = VARPTR(H(0))
30 PRINT Z
40 PRINT PEEK(Z) ; PEEK(Z+1) ; PEEK(Z+2) ; PEEK(Z+3)
RUN
17512
205 204 12 129
This routine returns the address of the first element of array H. The next element, if present, would
be at address 17004, the next at 17008, and so forth.
EXAMPLE 3: Addresses of array variables change each time a simple variable is assigned. For example:
10 T(0) = 0
20 PRINT VARPTR(T(0))
30 W = 0
40 PRINT VARPTR(T(0))
RUN
17484
17490
In this example, the variable W is first used after the array address was printed. Thus the array
address is shifted by the six bytes required for a simple variable.
EXAMPLE 4: 10 A$ = "Tuesday"
20 R = VARPTR(A$)
30 PRINT CHR$(PEEK(R))
T
In this case, new variables are declared after VARPTR returned the address. Unlike the array case,
the value returned will not change.
Vedere la pagina 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 185 186

Commenti su questo manuale

Nessun commento