Page 2 of 2

Re: PureBasic 5.10 beta 7

Posted: Fri Feb 08, 2013 1:46 pm
by Psychophanta
Beta 6 died soon!

Re: PureBasic 5.10 beta 7

Posted: Sun Feb 10, 2013 7:54 am
by Danilo
#PB_OS_Windows_Server_2008_R2 is missing in PB5.0 final (haven't installed the beta, sorry).

#PB_OS_Windows_Server_2012 works, but it is missing in the docs for OSVersion().

MSDN: Operating System Version

Code: Select all

Debug #PB_OS_Windows_Server_2008_R2
Debug #PB_OS_Windows_Server_2012
Does this already work with the latest beta?

Re: PureBasic 5.10 beta 7

Posted: Sun Feb 10, 2013 12:17 pm
by Fred
It's added for the next beta.

Re: PureBasic 5.10 beta 7

Posted: Sun Feb 10, 2013 11:18 pm
by Little John

Code: Select all

x.d = 3
Debug x       ; -> 3.0
Debug Str(x)  ; -> 3
For the sake of consistency, wouldn't it be better if Str(x) would also yield "3.0"?
IMHO "3.0" is actually better than "3" in this case, because it indicates that the respective variable is not an integer.

Re: PureBasic 5.10 beta 7

Posted: Mon Feb 11, 2013 12:37 am
by Blankname
Little John wrote:

Code: Select all

x.d = 3
Debug x       ; -> 3.0
Debug Str(x)  ; -> 3
For the sake of consistency, wouldn't it be better if Str(x) would also yield "3.0"?
IMHO "3.0" is actually better than "3" in this case, because it indicates that the respective variable is not an integer.

Code: Select all

x.d = 3
Debug x           ; -> 3.0
Debug StrD(x, 1)  ; -> 3.0
Str() automatically rounds to whole numbers. So imo it shouldn't change any, otherwise it would serve the same purpose of StrD().

Re: PureBasic 5.10 beta 7

Posted: Mon Feb 11, 2013 7:33 am
by Little John
Ooops. :oops: I was meaning StrD().

Second approach: :-)

Code: Select all

x.d = 3
Debug x        ; -> 3.0
Debug StrD(x)  ; -> 3
For the sake of consistency, wouldn't it be better if StrD(x) would also yield "3.0"?
IMHO "3.0" is actually better than "3" in this case, because it indicates that the respective variable is not an integer.

Yes, we could use StrD(x,1) in this particular case, but that would cut off decimal places in other cases.

Re: PureBasic 5.10 beta 7

Posted: Mon Feb 11, 2013 8:11 am
by Guevara-chan
For the sake of consistency, wouldn't it be better if StrD(x) would also yield "3.0"?
Quite unlikely. Just try something like this to ascertain:

Code: Select all

Define x.d = 3.0
Debug "x.d = «" + x.d + "» from debugger's perspective..." 

Re: PureBasic 5.10 beta 7

Posted: Mon Feb 11, 2013 11:31 am
by Fred
Use different threads for such questions, thanks.