I spotted one troublesome change in 5.30 (not sure if it should be considered a bug, it's more like something being overlooked)...
> Changed: DataSection label within Procedure are now local labels.
I think this isn't such a good idea. (Well, at least for me it isn't ) or perhaps labels / datasections deserve the keyword 'Global'.
Here's the issue:
I have some code with many include files. To keep the (folded) code clean I grouped most of those includes together in a procedure called 'init()'. Put the cursor on the Procedure init() line, hit F4, and voila, all includes are hidden from sight.
Previously I could refer to the includes using their labels, all throughout my code. Now the only way to access those includes is to place them outside a procedure, otherwise the label won't be found.
I think a better solution would be allowing the use of the keyword Global, either with Datasection (and have all labels within the datasection be global) or use the keyword Global in combination with the labe itselfl.
As it is now, I'm a bit stuck with 5.30. I don't want to move all includes to the 'root' of my code so I guess I'll go back to 5.22 LTS...
(I haven't checked out the next beta, did it fix this?)
PureBasic 5.30 is out !
Re: PureBasic 5.30 is out !
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureBasic 5.30 is out !
How about putting the includes in a separate .pbi file?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: PureBasic 5.30 is out !
You can create sections for folding easily without putting it into procedures:blueznl wrote:To keep the (folded) code clean I grouped most of those includes together in a procedure called 'init()'. Put the cursor on the Procedure init() line, hit F4, and voila, all includes are hidden from sight.
Code: Select all
;{ data sections
DataSection
myLabel: : Data.i 10
EndDataSection
;}
Re: PureBasic 5.30 is out !
Well, I'll just settled for adding another global var, that fixed it as well:
Code: Select all
...
Datasection
whatever:
Includebinary ....
EndDatasection
Global include_whatever = ?whatever
...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )