-
-
Notifications
You must be signed in to change notification settings - Fork 21
Functions
CD2 edited this page Feb 8, 2023
·
4 revisions
A definition of a return type, a function name, and an argument list is considered a function definition. Only basic data types, enumeration types, reference types, function pointers, and member function pointers can be returned. Putting a / before the definition makes it a public function that prohibits assignment to member variables.
int f(int x)
{
ret x;
}
.. can be written after the return type.
..f(int x) int
{
ret x;
}
Function definitions can also be written using Signature Types
$int(int) f(x)
{
ret x;
}