PureBasic 5.10 beta 7

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: PureBasic 5.10 beta 7

Post by Psychophanta »

Beta 6 died soon!
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: PureBasic 5.10 beta 7

Post 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?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 5.10 beta 7

Post by Fred »

It's added for the next beta.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PureBasic 5.10 beta 7

Post 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.
Blankname
Enthusiast
Enthusiast
Posts: 120
Joined: Sun Oct 14, 2012 9:11 am

Re: PureBasic 5.10 beta 7

Post 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().
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PureBasic 5.10 beta 7

Post 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.
User avatar
Guevara-chan
User
User
Posts: 13
Joined: Sat Jun 18, 2011 12:20 pm

Re: PureBasic 5.10 beta 7

Post 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..." 
Last edited by Guevara-chan on Mon Feb 11, 2013 3:54 pm, edited 1 time in total.
life MOV.I #life+1, *life
האם יש זמן לעצור ?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 5.10 beta 7

Post by Fred »

Use different threads for such questions, thanks.
Post Reply