Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| language:types2 [2025/04/21 15:52] – [Functions] rajit | language:types2 [2025/09/19 10:22] (current) – [Functions] rajit | ||
|---|---|---|---|
| Line 199: | Line 199: | ||
| Note that ACT is very strict about type-checking; | Note that ACT is very strict about type-checking; | ||
| + | |||
| + | ==== Grouping parameters ==== | ||
| + | |||
| + | Parameters can be combined into [[language: | ||
| + | |||
| ===== Direction flags ===== | ===== Direction flags ===== | ||
| Line 347: | Line 352: | ||
| </ | </ | ||
| - | === Operator overloading === | + | Note that functions cannot have any side-effects; |
| + | any of the members of the pure structure. Macros can be used to change those. | ||
| + | |||
| + | ==== Operator overloading ==== | ||
| + | |||
| + | Functions within pure structures are also used to support operator overloading. In particular, the following function methods are interpreted to be the definition of operator overloading for arithmetic operators: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | An example of a fixed-point arithmetic datatype is provided in the [[https:// | ||
| + | In the linked example, '' | ||