diff options
author | Kevin Chabowski <kevin@kch42.de> | 2012-01-15 13:04:03 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2012-01-15 13:04:03 +0100 |
commit | 8e35fad33de1fbecea7c29776f7afab6a4b88a48 (patch) | |
tree | 45140f6f610cc0481e5c6b0bc0eb932578bad972 /docu | |
parent | 7807fca367008ceaa8ff1b5a1b7f040520ee1cad (diff) | |
download | ste-8e35fad33de1fbecea7c29776f7afab6a4b88a48.tar.gz ste-8e35fad33de1fbecea7c29776f7afab6a4b88a48.tar.bz2 ste-8e35fad33de1fbecea7c29776f7afab6a4b88a48.zip |
Added builtin ste:get and fixed a code generation bug.
* ste:get allows us to get a variable's content dynamically.
* (') was escaped for TextNodes, which resulted to:
\'
should have been:
'
Diffstat (limited to 'docu')
-rw-r--r-- | docu/language_definition.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docu/language_definition.html b/docu/language_definition.html index 281baea..c4dd98b 100644 --- a/docu/language_definition.html +++ b/docu/language_definition.html @@ -63,6 +63,7 @@ <li><a href="#builtin_load">ste:load</a></li> <li><a href="#builtin_block">ste:block</a></li> <li><a href="#builtin_set">ste:set</a></li> + <li><a href="#builtin_get">ste:get</a></li> <li><a href="#builtin_calc">ste:calc</a></li> <li><a href="#builtin_mktag">ste:mktag</a></li> </ol> @@ -435,6 +436,14 @@ <code><pre><ste:set var="temp"><ste:foo /></ste:set><br /><ste:bar baz="$temp" /></pre></code> </p> + <h3 id="builtin_get">ste:get</h3> + <p>ste:get will return the content of a variable. The parameter <code>var</code> takes the name of the variable to get. Usefult, if you want to get a variable which name is stored in a variable.</p> + <p> + Example:<br /> +<code><pre><ste:get var="$foo" /></pre></code> + This will get the variable with the name that is stored in the variable <code>foo</code>. + </p> + <h3 id="builtin_calc">ste:calc</h3> <p>To perform mathematical calculations, you can use ste:calc. ste:calc calculates the mathematical formula it is wrapped around and returns the result. The formula is in the usual <a href="http://en.wikipedia.org/wiki/Infix_notation">infix-notation [ext. Link]</a> and has these operators: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code> and <code>^</code>. Numbers are always decimal, the decimal mark is <code>.</code> and numbers can be prefixed with an <code>-</code> to indicate a negative number. It is a good idea to wrap a negative number in brackets to prevent wrong evaluation (because <code>-</code> is also an operator). Calculations can be grouped with brackets: <code>(</code> and <code>)</code>.</p> <p>Real numbers are supported, complex numbers not.</p> |