SYNOPSIS:
    variable: Eccet uses a hierachical variable concept used in expressions.

DESCRIPTION:
    Eccet can evaluate /expression/s to examine or change the state
    of the application.

    When expressions reference variables, they do so by prefixing them
    with $ to separate them from string which are allowed to be written
    without extra markung in eccet expressions.

    SCOPING:

    Eccet uses scoping to allow for local variables. Usually a variable
    is only available in the context of the currently running script.

    An example for using such a local variable would be

    DECLARE int $i
    CECHO ${$i=5}

    which assigns 5 to the local variable called "i".

    If you want to use global variables, you must use the $root-scope:
    CECHO ${$root.view[current].fastrender}

    To allow for communication between subprocesses, you can use the
    $parent-scope. This allows to step up one level in the scope
    hierarchy.

    Example:

    DECLARE int $fd
    CECHO ${$fd=$func.file.open("result.dat","wct",0666)}
    ! call/to/sub_script

    sub_script:
    CECHO ${$root.func.file.puts($parent.fd,"Hello world.")}

    HIERARCHY:

    Eccet uses a large "struct" that contains much information
    about the internal state. This variable tree starts at $root
    and then divides into the following main variable trees:
    - $root.global containing global data, see /root.global/
    - $root.vol    containing information about currently active
      volumes - see /root.vol/
    - $root.view   containing information about currently active
      views - see /root.view/
    - $root.func   access to functions - see /function/
    - $root.application - reserved for application use.

SEE ALSO:
    datatype, expression, root.global, root.vol, root.view
