*Buffer to string

Just starting out? Need help? Post your questions and find answers here.
svenzip
New User
New User
Posts: 1
Joined: Tue Mar 24, 2020 5:15 pm

*Buffer to string

Post by svenzip »

What kind of function does * Buffer need to be printed by the Print function?

PeekS is not working :(
User avatar
NicTheQuick
Addict
Addict
Posts: 1226
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: *Buffer to string

Post by NicTheQuick »

You really should us give more information about what you are doing.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: *Buffer to string

Post by kenmo »

Yes, we need more info... this works fine:

Code: Select all

OpenConsole()

PrintN("Hello")

PrintN( PeekS( ?MyBuffer) )

*MyPtr = ?MyBuffer
PrintN( PeekS( *MyPtr) )
Input()

DataSection
  MyBuffer:
  Data.c 'H', 'e', 'l', 'l', 'o', #NUL
EndDataSection
ozzie
Enthusiast
Enthusiast
Posts: 429
Joined: Sun Apr 06, 2008 12:54 pm
Location: Brisbane, Qld, Australia
Contact:

Re: *Buffer to string

Post by ozzie »

You may need to use one of the PeekS formats, eg #PB_Ascii.
Post Reply