Changes between Version 92 and Version 93 of IR


Ignore:
Timestamp:
11/30/15 07:22:47 (10 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR

    v92 v93  
    260260* `new(t)` : new (default) value of `Dytype` t
    261261* `defined(e)` : is `e` defined? `Bool` type
    262 * `cast(e,T)` : casts `e` to a value of the named type.  `T` must name a subtype of the static type of `e`.
    263  * cast of integer to array-of-boolean, and vice-versa?
    264  * **Instead of casts would it be better to have explicit functions for each legal kind of cast?**
     262* `cast(e,T)` : casts `e` to a value of the named type.
     263 * A cast can only take place when there is no change to the underlying value.  It is only for changing the type.  Example: one can cast from any integral type to another, but there might be an exception if the value is not in the range of the targeted type.  One can cast any `Float` value to a `Real` value, but not the other way.  (To convert from a `Real` to a `Float`, use, e.g., `round`.)  If t1 is a subtype of t2, one can always cast from t1 to t2 (though this is rarely necessary, since an expression of type t1 can be used wherever one of type t2 is expected).
    265264* `ite(e1,e2,e3)`: if-then-else (conditional) expression, like `e1?e2:e3` in C.
    266265* `call(e0,<e1,...,en>)` : a function invocation where `e0` must evaluate to either an abstract or pure system function