Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

pre_increment function

Add 1 to a variable in place and return the new value.

How to write it

pre_increment(name)

name
The variable to update. Takes a variable.

Examples

  • a:=1;  pre_increment⁡(a)  2\displaystyle a := 1;\; \operatorname{pre\_increment}(a) \; 2
    a := 1; pre_increment(a)

    In the solver, a := 1; pre_increment(a) gives 2.

    Open in the solver
  • pre_decrement

    Subtract 1 from a variable in place and return the new value.

  • increment

    Add 1 to a variable in place and return its old value.

  • release_hold

    Evaluate an expression that was held.

  • set

    Assign a value to a name; also written name := value.

  • piecewise

    Cases written value if condition, with an optional otherwise case.

  • set_delayed

    Define a function; also written f(x) := body.