The OpenD Programming Language

Abort.onOverflow

Called automatically upon an overflow during a unary or binary operation.

  1. typeof(~Lhs()) onOverflow(Lhs lhs)
  2. typeof(Lhs() + Rhs()) onOverflow(Lhs lhs, Rhs rhs)
    struct Abort
    static
    typeof(Lhs() + Rhs())
    onOverflow
    (
    string x
    Lhs
    Rhs
    )
    (
    Lhs lhs
    ,
    Rhs rhs
    )

Parameters

x

The operator, e.g. -

lhs Lhs

The left-hand side (or sole) argument

rhs Rhs

The right-hand side type involved in the operator

Return Value

Type: typeof(Lhs() + Rhs())

Nominally the result is the desired value of the operator, which will be forwarded as result. For Abort, the function never returns because it aborts the program.

Meta