Page 1 of 1
Syntax Error in DataSection
Posted: Sat Sep 21, 2013 3:54 pm
by Paul
this gives syntax error in 5.20, worked fine in all previous versions ...
Code: Select all
DataSection
_MyIcon:IncludeBinary "exit.ico"
EndDataSection
code must be changed to this to work...
Code: Select all
DataSection
_MyIcon:
IncludeBinary "exit.ico"
EndDataSection
Re: Syntax Error in DataSection
Posted: Sat Sep 21, 2013 4:00 pm
by c4s
Try this:
Code: Select all
DataSection
_MyIcon: : IncludeBinary "exit.ico"
EndDataSection
Re: Syntax Error in DataSection
Posted: Sat Sep 21, 2013 4:01 pm
by Little John
Paul wrote:code must be changed to this to work...
Code: Select all
DataSection
_MyIcon:
IncludeBinary "exit.ico"
EndDataSection
... or to this:
Code: Select all
DataSection
_MyIcon: : IncludeBinary "exit.ico"
EndDataSection
This has been changed deliberately. No bug.
//edit: Oops! c4s was about half a minute faster.

Re: Syntax Error in DataSection
Posted: Sat Sep 21, 2013 4:03 pm
by netmaestro

Fred's point is well taken. It wasn't so obvious but in earlier versions where that worked, we were getting a newline "for free" as the single colon is part of the label.
Re: Syntax Error in DataSection
Posted: Sat Sep 21, 2013 4:38 pm
by luis
netmaestro wrote:in earlier versions where that worked, we were getting a newline "for free" as the single colon is part of the label.
And that also caused the problem of letting mistyped keywords/procedures go unnoticed since they were silently interpreted as labels.
http://www.purebasic.fr/english/viewtop ... 17#p421117
Re: Syntax Error in DataSection
Posted: Sat Sep 21, 2013 5:03 pm
by Paul
netmaestro wrote:we were getting a newline "for free" as the single colon is part of the label.
Ah, this explanation make sense
