| View previous topic :: View next topic |
| Author |
Message |
rigrig
Joined: 03 Feb 2011 Posts: 7
|
Posted: Tue Jan 03, 2012 3:06 pm Post subject: Built-in functions |
|
|
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 |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3274
|
Posted: Tue Jan 03, 2012 6:01 pm Post subject: |
|
|
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 |
|
 |
|