Ptr.String - this item does not exist

I’m using a Ptr as a faster way to fill a MemoryBlock, all is well until I tried String…

[code]dim p As Ptr = myMemoryBlock
p.Single(0) = 4.1 //these work
p.UInt32(4) = 9

p.String(8) = “hello” //this doesn’t [/code]
Is there something I’m missing? String is listed in the docs, it autocompletes and the code helper region shows the syntax but the compiler says “This item does not exist” with ‘p.String’ highlighted.

You’re right. I had never tried this with a Ptr before, but it looks like it doesn’t really exist, or it’s a bug. Use myMemoryBlock.StringValue( offset ) instead.

Will do, thanks Kem.

…actually, it’s myMemoryBlock.StringValue( offset, length ) :slight_smile:

Yeah, yeah, whatever. :wink: