Plange


when used in the function syntax, indicates that the implementation's behavior meets the requirements of a pure function

Example

pow2 := (x) pure { return x * x; };
			

Notes: The pure keyword asserts to the toolchain that the behavior of the function is tractable and supports all properties and operations offered by function objects. An error occurs if the toolchain determines that any of the requirements of pure functions are not met by the implementation. Pure functions may only use data-pull semantics, and only on constants, which includes values (not by reference) passed as formal parameters. See function


copyright © Brent Lewis 2017