TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Built-in functions

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
rigrig



Joined: 03 Feb 2011
Posts: 7

PostPosted: Tue Jan 03, 2012 3:06 pm    Post subject: Built-in functions Reply with quote

It would be nice if you could call commands that set a single variable directly as a function.

Examples:
Code:
#showme {there are @math{$apples + $pears} fruits on the table};
#showme {It is now @format{%T} seconds since the epoch};
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3274

PostPosted: Tue Jan 03, 2012 6:01 pm    Post subject: Reply with quote

Try this:

Code:

#function {math}
{
    #math result {%0}
}

#showme @math{1+1}

#function {format}
{
    #format {result} {%1} {%2}
}

#showme @format{%t;%H:%M:%S}
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group