From 8e35fad33de1fbecea7c29776f7afab6a4b88a48 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 15 Jan 2012 13:04:03 +0100 Subject: 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: ' --- docu/language_definition.html | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docu') 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 @@
  • ste:load
  • ste:block
  • ste:set
  • +
  • ste:get
  • ste:calc
  • ste:mktag
  • @@ -435,6 +436,14 @@
    <ste:set var="temp"><ste:foo /></ste:set>
    <ste:bar baz="$temp" />

    +

    ste:get

    +

    ste:get will return the content of a variable. The parameter var takes the name of the variable to get. Usefult, if you want to get a variable which name is stored in a variable.

    +

    + Example:
    +

    <ste:get var="$foo" />
    + This will get the variable with the name that is stored in the variable foo. +

    +

    ste:calc

    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 infix-notation [ext. Link] and has these operators: +, -, *, / and ^. Numbers are always decimal, the decimal mark is . and numbers can be prefixed with an - to indicate a negative number. It is a good idea to wrap a negative number in brackets to prevent wrong evaluation (because - is also an operator). Calculations can be grouped with brackets: ( and ).

    Real numbers are supported, complex numbers not.

    -- cgit v1.2.3-54-g00ecf