Page 8 of 25

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 1:37 am
by charvista
I don't know yet what is a module, but if it is something we do create and remove afterwards, then I agree terminologically with Kuron.
I would even use Module instead of UseModule or any other prefix, as it is not necessary. If we say Module, it means to use it.
FreeModule is to remove it from Memory and looks perfect to me.

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 7:54 am
by User_Russian
charvista wrote:FreeModule is to remove it from Memory and looks perfect to me.
What you write?
The module is part of the static code of the program and can not remove it from memory!
Read more about the modules. http://en.wikipedia.org/wiki/Namespace

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 8:55 am
by charvista
charvista wrote:I don't know yet what is a module
Oh, now I see what it is. In this case, FreeModule is certainly NOT appropriate, as it does not free any memory!

In this case, I have two naming suggestions:

Module / EndModule (like Enumeration / EndEnumeration)
or
StartModule / StopModule (like StartDrawing / StopDrawing)

Spasibo/Thank you User_Russian for your clarification.

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 10:57 am
by Psychophanta
Module / EndModule is already used to the definition area of the Module itself.
To give more significance it could be:
WithModule / EndWithModule

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 11:03 am
by luis
You can discuss it in this thread -> http://www.purebasic.fr/english/viewtop ... =3&t=55196

I believe Fred would appreciate it. After all he has already dropped three hints. :shock:

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 12:56 pm
by TI-994A
Thanks Fred, and thank you to the Fantaisie team. Great work guys!

Just figured out the new Module system, and realised that it may be PureBasic's first steps into OOP, complete with namespace support. Evolutionary.

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 1:06 pm
by User_Russian
TI-994A wrote:first steps into OOP
No. http://www.purebasic.fr/english/viewtop ... 70#p403070
Fred wrote:PureBasic won't be object oriented, period.
A pity.
If objects used wisely (and not where you can do without them), can simplify programming and make the code more readable.

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 1:15 pm
by Psychophanta
User_Russian wrote: If objects used wisely (and not where you can do without them), can simplify programming and make the code more readable.
It depends on the kind of program.
That affirmation is valid only for concrete cases.

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 11:01 pm
by Andre
I've just switched our project from using PB5.11 to PB5.20b5.

And I must say: well done! :D Only had to change one constant from #PB_Sort_Integer to #PB_Integer, and this in a 38,000 lines sourcecode!
(@Fred: this should also be mentioned in the 'Changed:' section of the PB5.20 announcement)

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 11:08 pm
by c4s
Andre wrote:Only had to change one constant from #PB_Sort_Integer to #PB_Integer, and this in a 38,000 lines sourcecode!
(@Fred: this should also be mentioned in the 'Changed:' section of the PB5.20 announcement
This was already changed in PB5.10:
5.10 Changelog wrote:Changed: replaced #PB_Sort_ with #PB_ to avoid possible errors

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sat Jul 06, 2013 11:20 pm
by Andre
@c4s: ....hm, so the #PB_Sort_... constants must still have been present in PB5.11 (at least on MacOS), because my project compiled just fine with PB5.11 until now. Anyway... no or only one change for the switch to PB5.20 is good :-)

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sun Jul 07, 2013 6:41 am
by fsw
Had the same problem with #PB_Sort_String; changed it to #PB_String and it seems to work.

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sun Jul 07, 2013 10:22 am
by Duffer123
Stupid question - how do I download the latest beta?

[edit]

scratch that, dumb question, have figured it out.... Doh!

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sun Jul 07, 2013 11:18 am
by TI-994A
Andre wrote:...constants must still have been present in PB5.11 (at least on MacOS), because my project compiled just fine with PB5.11 until now.
Hello Andre. Yes, both the PB_Integer and PB_Sort_Integer constants are present in PureBasic v5.11, but they hold different values.

Furthermore, although the PB_Sort_Integer and PB_Sort_Long constants have the same values, PB_Integer and PB_Long hold different values.

Re: PureBasic 5.20 beta 5 is ready to test !

Posted: Sun Jul 07, 2013 11:42 am
by Little John
It is not necessary at all to struggle with those type constants for sorting. We don't have to give this information to PB, because PB knows it itself. :-)

see e.g. http://www.purebasic.fr/english/viewtop ... 78#p415278