Page 1 of 1

POKE headache

Posted: Mon Dec 20, 2004 7:18 am
by Lily
To change 1 letter to another with"POKE",
I got that code from your site (thank you):

x$ = "C"
Def Seg = sseg(x$)
Poke sadd(x$), asc("D")
Def Seg
print x$
In QB45 you should change SSEG to VARSEG, and SADD to VARPTR


It works in QB7.1 but not in QB 4.5 with the recommended change (sseg for Varseg,etc)
In return I get many characters.Why?

Posted: Mon Dec 20, 2004 12:36 pm
by Guest
try this:

x% = ASC("C")

def seg = varseg(x%)
poke varptr(x%), ASC("D")
def seg = DGROUP

print x%

you might have to add more $s or take aways $s.

Posted: Mon Dec 20, 2004 1:06 pm
by Z!re
I have no idea why it doesent work, but if you have QB7.1 I recomend you use that instead of 4.5

The difference isnt that big, and 7.1 can handle larger programs.

Or even change to freeBASIC