The following produces different results:
defint a - z
cls
dim straptr as string ptr
dim intaptr as byte ptr
dim five as string
'********* These have the same address ************
intaptr = varptr32(five)
straptr = varptr32(five)
?intaptr
?straptr
@straptr = "5"
[email protected] '***** this produces "5"
[email protected] '***** this produces 1
A = strseg(five)
b = strptr(five)
def seg = a
c = peek(b)
J$ = peek$(b,1)
def seg
?J$ '**** this produces "5"
?c, hex$(c) '**** this produces 53 and 35 (ascii codes)
def seg
end
The questions is, which is correct the pointers or the peeks?
I would expect [email protected] to produce 5 and [email protected] to produce 53 the same as peek does.
------------------
defint a - z
cls
dim straptr as string ptr
dim intaptr as byte ptr
dim five as string
'********* These have the same address ************
intaptr = varptr32(five)
straptr = varptr32(five)
?intaptr
?straptr
@straptr = "5"
[email protected] '***** this produces "5"
[email protected] '***** this produces 1
A = strseg(five)
b = strptr(five)
def seg = a
c = peek(b)
J$ = peek$(b,1)
def seg
?J$ '**** this produces "5"
?c, hex$(c) '**** this produces 53 and 35 (ascii codes)
def seg
end
The questions is, which is correct the pointers or the peeks?
I would expect [email protected] to produce 5 and [email protected] to produce 53 the same as peek does.
------------------
Comment