Re: [Circle] Number Formatting

From: Eric Jones (fpicard@taeback.kornet.nm.kr)
Date: 11/16/96


On Fri, 15 Nov 1996, Bruce, Ray, Phil wrote:

> How do you format numbers and text on the screen?
> I'm in the proccess of creating a new score screen and I would like to have
> it in some kind of table screen... I know how to do tabs but there is ONE
> major thing that I would like to know how to do...
> How would I do this?
> 
> Experience: [9999999] <----FULL Experience
> Experience: [  33421] <----NOT FULL Experience
> Experience: [      0] <----EMPTY Experience
> 

somethig like this:
sprintf("Experience: [%-7d]", GET_EXP(ch));

the %-7d will hold 7 places for the number, so as the number increases, 
the number of spaces at the beginning of the number will go down.

I know it's not the best explanation, but if you give it a try, you will 
see that it will do what you want.

o--------------------------------o
|  Eric Jones                    |
|  fpicard@taeback.kornet.nm.kr  |
|  jonese@cs51.osan.af.mil       |
o--------------------------------o


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST