I hae always been a bit uncertain about handles and how they are
dereferenced,
so I made up the following chart.
I would appreciate any comments changed, added or deleted.Thanks in
advance.
Stewart
Data% = "12,300"
Relocatable
Non Relocatable of Data
Handle Pointer Address
Location "1,234,567" "3,126,594" "7,183,546"
Contents "3,126,594" "7,183,546" "12,300"
Handle & Pointer locations never move
& Data locations are moved by the system when more space is needed.
The handle content is automatically updated
PEEK LONG 4-Bytes "[1,234,567]" "=3,126,594" The Handle contents
(Pointer Address)
PEEK LONG 4-Bytes "[3,126,594]" "=7,183,546" The Pointer contents
(Data address)
PEEK LONG 4-Bytes "[7,183,546]" "=12,300" What you want
PEEK LONG 4-Bytes "[[1,234,567]]" "=7,183,546"
PEEK WORD 2-Bytes "{[[1,234,567]]}" "=12,300" "The contents of
7,183,546"
"If Data$ = 98,765"
4-Bytes "[[[1,234,567]]]" "= 98,765"
"If Data$ = ""Hello Joe, whadaya know?""!"" "
X Bytes "{7,183,546} =" H
"{7,183,546}+1 =" e etc.
@Data% = "7,183,546" Address of Data