Has the conventional meaning -- evaluates to the expressed integer. Just as E integers are unlimited in precision, so are E's literal integers. However, as in Java, in E you can only express non-negative integers literally. "-3" expands into "3 negate". This should make no difference to the E programmer in practice.
The E programmer can always use an IntegerRegion to declare that a variable may only hold a subrange of integers, or that a return value may only be in a subrange:
? pragma.syntax("0.8") ? var x :(2..4) := 3 # value: 3 ? x := 5 # problem: 5 is not in the region 2..!5 ? x # value: 3 Currently, such variables are always more expensive than unconstrained variables. However, we hope to eventually have such declarations enable scalar storage & arithmetic with only overflow checking. |
||||||||||||||||||||||||
Unless stated otherwise, all text on this page which is either unattributed or by Mark S. Miller is hereby placed in the public domain.
|