Just starting out? Need help? Post your questions and find answers here.
Paul
PureBasic Expert
Posts: 1282 Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:
Post
by Paul » Sat Sep 21, 2013 3:54 pm
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
c4s
Addict
Posts: 1981 Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany
Post
by c4s » Sat Sep 21, 2013 4:00 pm
Try this:
Code: Select all
DataSection
_MyIcon: : IncludeBinary "exit.ico"
EndDataSection
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Little John
Addict
Posts: 4777 Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany
Post
by Little John » Sat Sep 21, 2013 4:01 pm
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.
netmaestro
PureBasic Bullfrog
Posts: 8451 Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada
Post
by netmaestro » Sat Sep 21, 2013 4:03 pm
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.
BERESHEIT
luis
Addict
Posts: 3893 Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy
Post
by luis » Sat Sep 21, 2013 4:38 pm
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
Paul
PureBasic Expert
Posts: 1282 Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:
Post
by Paul » Sat Sep 21, 2013 5:03 pm
netmaestro wrote: we were getting a newline "for free" as the single colon is part of the label.
Ah, this explanation make sense