ERights Home elang / kernel 
Back to: Slot-Expression On to: Sequence Expression

Assignment Expression


Has the conventional meaning -- evalues the right hand side to a value and sets to current value of the variable on the left to be that value. The value of the assignment statement as a whole is the same as the value of the right hand side. The Noun may not be defined as ":final", or the program will be statically rejected.

BNF:
Noun ":=" eExpr
XML DTD:
<!ELEMENT assignExpr (Noun, %eExpr;)>
Java:
lvalue-for-noun = jExpr

Where the lvalue has the same appearance in Java as the rvalue, as determined by the Noun translation.

Example:
c := a + b
in Kernel-E:
c := a.add(b)
in XML:
<assignExpr>
    <Noun>c</Noun>
    <callExpr>
        <Noun>a</Noun>
        <Verb>add</Verb>
        <Noun>b</Noun>
    </callExpr>
</assignExpr>
in Java:

If c is a simple noun (see Noun):

    c = a + b

If it's boxed:

    c_Box[0] = a + b

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: Slot-Expression On to: Sequence Expression
Download    FAQ    API    Mail Archive    Donate

report bug (including invalid html)

Golden Key Campaign Blue Ribbon Campaign