Built-in functions
Built-in functions are provided by the compiler, are in scope in every module, and need no module prefix. They fall into four groups:
| Page | Functions |
|---|---|
| Constraints | float, eq |
| Collections | cons, head, tail, range_full, seq_len, seq_concat, seq_flatten, seq_sum, seq_any, seq_all |
| Math | max_float, min_float, max_int, min_int |
| Vias | max_via_array |
These names are reserved: a module can't declare an item with one of them or bind one with use.
The layout functions, such as rect, crect, polygon, path, text, inst, bbox, and dimension, are in the std::layout module and are imported with use. Other functions written in Argon itself live under std::; see the standard library.
Types
| Category | Types |
|---|---|
| Scalars | Float, Int, Bool, String, Any, () |
| Geometry | Rect, Polygon, Path, Point |
| Hierarchy | Cell, Inst, SchematicInst |
| Schematic | Signal, imported from std::schematic |
| Collections | [T], (A, B) |
Signature notation
- Arguments before the keyword list are positional and required.
name?is an optional keyword argument.Tis a type parameter inferred from the arguments.- Initial values end in
i, such asx0iorwidthi. - Unless stated otherwise, coordinates and dimensions are
Float.