Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
anylo
Beginner


Joined: 21 Feb 2001
Posts: 28
Location: Finland

PostPosted: Wed Jan 15, 2003 10:00 am   

[6.40] Floats and integers
 
I'm trying to convert some ints into floats.

#show %eval(%float(1) / %float(3)) gives 1,0,0 instead of 0.33.

Am I doing something wrong or is this a bug related to locales?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Jan 15, 2003 12:50 pm   
 
Could be a bug. The same code give 0.33 for me. Try e-mailing Zugg.

Kjata
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jan 16, 2003 12:54 am   
 
quote:

Could be a bug. The same code give 0.33 for me. Try e-mailing Zugg.

Kjata



Yeah, it was already noted at one point right before 6.40 came out. Zugg is actually using a decimal in some places while using regional settings in other places or something along those lines. Since the regional settings don't match, a different route through the parser is taken.

li'l shmoe of Dragon's Gate MUD
Reply with quote
kymon
Novice


Joined: 29 Jan 2003
Posts: 40

PostPosted: Tue Mar 11, 2003 5:38 pm   
 
it seems i have the same prob:

#math a %float(5)/3
#show @a

it says 0

#show %float(5)
5,0

i'm using zmud 6.40, german windows xp

just tried %eval(%float(1) / %float(3)),
and it also says 1,0,0

is this fixed in the beta yet? or is there any workaround?
Reply with quote
kymon
Novice


Joined: 29 Jan 2003
Posts: 40

PostPosted: Wed Mar 12, 2003 7:46 am   
 
as a workaround, i changed my regional settings in windows. the drawback is that ALL programs now use this "weird" way of displaying numbers.

for the german folks having the same problem (only tested in win xp):
"Klicken Sie zum Öffnen von Regions- und Sprachoptionen auf Start, klicken Sie auf Systemsteuerung, und doppelklicken Sie dann auf Regions- und Sprachoptionen." (quote from windows help system)
then click on "Anpassen", and change
"Dezimaltrennzeichen" to "." and "Symbol für Zifferngruppiering" to ","
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net