Variable
A declared variable's domain, starting value and hints, in a Variables option: the domain picks the control a hole showing it gets. Held as written.
Variable(domain, start, options...)a variable ranging over domain, starting at start, with Where and Range hintsTyped signatures
| Type | Package | Applies |
|---|---|---|
(any*) -> any | formats | always |
Details
Variables -> [_d -> Variable(Integers, -5, Where -> IsSquareFree && !IsSquare, Range -> [-400, 400])] on an element declares _d for everything inside it: an integer starting at −5, stepping only through squarefree non-squares, drawn at random from −400 to 400. A bare starting value, a domain (Integers, Reals, Booleans) or a list of choices declares one without it.
Examples
About
| Examples | 1 |
|---|