|
Lina Novice
Joined: 12 Oct 2006 Posts: 49
|
Posted: Thu Sep 06, 2007 11:52 pm
[2.02] %time removes spaces from own made timestamps. |
I attempted to make a similar timestamp to the one I used in zmud.
I used:
#say %time(h:n:s z)
I expected to get:
0:44:41 251
instead I got:
0:44:41251
I'm uncertain if it is meant to be this way. If it is, is there any way I can place the space in. Thanks. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Sep 07, 2007 12:10 am |
The %time function takes a *string* argument to specify the time format. You need to put "" quotes around your string value, like this:
#say %time("h:n:s z")
otherwise CMUD eats the spaces.
This is just like calling functions with strings in other programming languages, so it's good to get used to using quotes around literal strings. |
|
|
|
Lina Novice
Joined: 12 Oct 2006 Posts: 49
|
Posted: Fri Sep 07, 2007 2:05 am |
thank you
|
|
|
|
|
|