ERights Home elang / kernel 
Back to: Define Expression On to: If Expression

Hide Expression


Has the conventional meaning as generalized to an expression language -- evaluates the contained expression in a scope box. The value of the hide expression is the value of the contained expression. Any variables defined by the contained expression are not visible in the succeeding scope of the hide expression.

BNF:
"{" eExpr "}"
XML DTD:
<!ELEMENT hideExpr (%eExpr;)>
Java:
"{" jExpr "}"
Example:
def x := {
    def y := 3
    y * 2
}
in Kernel-E:
def x := {
    def y := 3
    y.multiply(2)
}
in XML:
<defineExpr>
    <finalPattern>
        <Noun>x</Noun>
        <Noun>any</Noun>
    </finalPattern>
    <hideExpr>
        <seqExpr>
            <defineExpr>
                <finalPattern>
                    <Noun>y</Noun>
                    <Noun>any</Noun>
                </finalPattern>
                <Integer>3</Integer>
            </defineExpr>
            <callExpr>
                <Noun>y</Noun>
                <Verb>multiply</Verb>
                <Integer>2</Integer>
            </callExpr>
        </seqExpr>
    </hideExpr>
</defineExpr>
in Java:
Object result_5;
{
    Object y = BigInteger.valueOf(3);
    result_5 = E.call(y, "multiply", BigInteger.valueOf(2));
}
Object x = result_5;

 

x
 
Unless stated otherwise, all text on this page which is either unattributed or by Mark S. Miller is hereby placed in the public domain.
ERights Home elang / kernel 
Back to: Define Expression On to: If Expression
Download    FAQ    API    Mail Archive    Donate

report bug (including invalid html)

Golden Key Campaign Blue Ribbon Campaign