set function
Assign a value to a name; also written name := value.
How to write it
set(name, value)
- name
- The name to assign. Takes a variable.
- value
- The value. Takes an expression.
Examples
a := 5; a + 1In the solver,
Open in the solvera := 5; a + 1gives6.
Related functions
- set_delayed
Define a function; also written f(x) := body.
- release_hold
Evaluate an expression that was held.
- slot
The n-th argument of a function with no name: inside function(body), slot(1) is the first.
- pre_increment
Add 1 to a variable in place and return the new value.
- subs_repeated
Apply substitution rules again and again until nothing changes.
- pre_decrement
Subtract 1 from a variable in place and return the new value.