Page 1 of 1

[Solved] PokeS(,,#PB_Ascii)

Posted: Wed Feb 17, 2021 9:39 am
by majikeyric
Shouldn't the string stored in memory as an ASCII string ? this is not the case....

Code: Select all

*MemoireID = AllocateMemory(5000)
If *MemoireID
	PokeS(*MemoireID, "PureBasic" ,#PB_Ascii)
	ShowMemoryViewer(*MemoireID, 256)
	FreeMemory(*MemoireID)  
EndIf

Re: PokeS(,,#PB_Ascii) Bug 5.73

Posted: Wed Feb 17, 2021 9:56 am
by STARGĂ…TE
Please read the manual first!
The parameters of PokeS are PokeS(*MemoryBuffer, Text$ [, Length [, Flags]])

Code: Select all

*MemoireID = AllocateMemory(5000)
If *MemoireID
   PokeS(*MemoireID, "PureBasic", -1, #PB_Ascii)
   ShowMemoryViewer(*MemoireID, 256)
   FreeMemory(*MemoireID) 
EndIf

Re: PokeS(,,#PB_Ascii) Bug 5.73

Posted: Wed Feb 17, 2021 9:56 am
by sq4
You are using #PB_Ascii as length...

(Oops, STARGATE beat me)

Re: [Solved] PokeS(,,#PB_Ascii)

Posted: Wed Feb 17, 2021 10:16 am
by majikeyric
I'm probably drunk this morning :lol: , thanks guys!