Data.A "No error !"

Share your advanced PureBasic knowledge/code with the community.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Data.A "No error !"

Post by Olli »

An other undocumented way to store datas (especially, when we want to store and read hexa big endian byte datas) :

Code: Select all

DataSection

Dta:
Data.A "1122334455667788"

EndDataSection

For *I = ?Dta To ?Dta + 15 Step 2
  Debug PeekS(*I, 2, #PB_Ascii)
Next
Less compact, unicode version :

Code: Select all

DataSection

Dta:
Data.U "1122334455667788"

EndDataSection

For *I = ?Dta To ?Dta + 31 Step 4
  Debug PeekS(*I, 2)
Next