POKE headache

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
Lily

POKE headache

Post 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?
Guest

Post 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.
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post 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
I have left this dump.
Post Reply