Cannot assign label address to pointer

Just starting out? Need help? Post your questions and find answers here.
bbanelli
Posts: 107
Joined: Mon Jul 13, 2015 7:40 am

Cannot assign label address to pointer

Post by bbanelli »

Code: Select all

Define *p

*p = ?NumericalData

DataSection
  NumericalData:    
    Data.l 100, 200, -250, -452, 145
EndDataSection  
Line 2 - syntax error.

This code is also not working albeit it is legal and operational in PureBasic.

Code: Select all

Define *p

Debug PeekL(?NumericalData)

DataSection
  NumericalData:    
    Data.l 100, 200, -250, -452, 145
EndDataSection 
Is there a workaround to use PureBasic's code?
"If you lie to the compiler, it will get its revenge."
Henry Spencer
http://www.pci-z.com/
Fred
Site Admin
Posts: 1510
Joined: Mon Feb 24, 2014 10:51 am

Re: [SB 2.00 b7] Cannot assign label address to pointer

Post by Fred »

The '?' operator is not supported in SpiderBasic, but you should be able to use the regular Restore/Read combo to read your data section content.
User avatar
MrTAToad
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England
Contact:

Re: Cannot assign label address to pointer

Post by MrTAToad »

Might be worth removing reference to it in the help files...
Post Reply