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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
fernir
Newbie


Joined: 05 May 2015
Posts: 7

PostPosted: Tue May 05, 2015 12:26 am   

Making large numbers readable?
 
Is there some way to make very large numbers more readable? Such as (800,000,000,000) reading as (800b) or (25,700,000,000,000) reading as (25.7t)?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4717
Location: Pensacola, FL, USA

PostPosted: Tue May 05, 2015 6:21 am   
 
You could always make your own function to do that and pass the variable through it.

#FUNCTION shortNum($num) {
#SWITCH ($num>999999) {#RETURN %concat(%float($num/1000000), "m")}
($num>999) {#RETURN %concat(%float($num/1000), "k")}
}


Might be some better display options inbuilt into the %format function.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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