problem with latest version

Just starting out? Need help? Post your questions and find answers here.
RobKiwi
User
User
Posts: 19
Joined: Tue Oct 23, 2012 5:47 am
Location: Rawene, Hokianga, New Zealand
Contact:

problem with latest version

Post 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?
It's good to travel hopefully, but nice to arrive sometimes
User avatar
idle
Always Here
Always Here
Posts: 5844
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: problem with latest version

Post 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
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: problem with latest version

Post 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.
RobKiwi
User
User
Posts: 19
Joined: Tue Oct 23, 2012 5:47 am
Location: Rawene, Hokianga, New Zealand
Contact:

Re: problem with latest version

Post 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!
It's good to travel hopefully, but nice to arrive sometimes
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: problem with latest version

Post by luis »

It's not a matter of brilliancy. :wink:
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
"Have you tried turning it off and on again ?"
A little PureBasic review
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: problem with latest version

Post 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: problem with latest version

Post 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...
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Post Reply