Page 1 of 1
problem with latest version
Posted: Fri Jan 24, 2014 2:10 am
by RobKiwi
Some time ago I wrote a small program on Purebasic 4.61 which worked well.
I have just upgraded to version 5.21 and find that the following lines generate a syntax error:
DataSection
_OPT_Form1_ImageMain:IncludeBinary "Images\query.png"
_OPT_Form1_Thumbs1:IncludeBinary "Images\blankitS.png"
EndDataSection
On going back to the earlier version it works again.
I've looked at the list of changes and can't see why there is a problem. Can anyone help?
Re: problem with latest version
Posted: Fri Jan 24, 2014 2:24 am
by idle
PB 5.20 added line continuation characters and it resulted in a side effect with labels
Code: Select all
DataSection
_OPT_Form1_ImageMain:
IncludeBinary "Images\query.png"
_OPT_Form1_Thumbs1:
IncludeBinary "Images\blankitS.png"
EndDataSection
Re: problem with latest version
Posted: Fri Jan 24, 2014 2:28 am
by Demivec
If you want the lines arranged as in the original you have to add a ':' between the label and the rest of the line.
Code: Select all
DataSection
_OPT_Form1_ImageMain: : IncludeBinary "Images\query.png"
_OPT_Form1_Thumbs1: : IncludeBinary "Images\blankitS.png"
EndDataSection
In versions prior to 5.20 the label wasn't treated as it's own line or statement.
Re: problem with latest version
Posted: Sat Jan 25, 2014 1:09 am
by RobKiwi
Many thanks to both of you. It works well now with the new version.
But I wonder what I would have done without your advice? I find nothing about
the alteration in the list of changes. Very frustrating to those of us who are less than brilliant!
Re: problem with latest version
Posted: Sat Jan 25, 2014 1:19 am
by luis
It's not a matter of brilliancy.
The PB help is good enough but not perfect, and unfortunately the changes from the previous version often fall under the "Fixed: Some compiler and libraries related bugs" umbrella, so you have to follow the forum daily to catch them all.
Fortunately the users' workforce operating here it's generally able to fill the gaps.
One of the best PB features for newcomers without a doubt.
Here the reason behind the modification if you are curious about it: ->
http://www.purebasic.fr/english/viewtop ... 28&t=55874
Re: problem with latest version
Posted: Sat Jan 25, 2014 2:38 am
by PB
> I wonder what I would have done without your advice?
You just ask here to get friendly help. As far as I'm concerned,
these forums are as much part of the PureBasic product as the
actual product itself.

I've never seen another forum like it.
Re: problem with latest version
Posted: Sat Jan 25, 2014 12:38 pm
by c4s
RobKiwi wrote:But I wonder what I would have done without your advice? I find nothing about the alteration in the list of changes.
A couple of month ago I made a feature request for that very reason:
Documentation of how to switch from one version to the next
In another thread Fred already stated that he likes this idea and in
a blog post he said that "we will provide clear migration path when going from one LTS version to another one". So chances are high that updating old source code will soon be much easier...