fa/doc/md/MACROS.md
Ari Archer de936a7513
Unsized strings, pop keyword and dead code elimination
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
2022-07-22 10:43:57 +03:00

30 lines
364 B
Markdown

# Fa macros
Fa macros are pieces of code that get substituted
at compile time
You can define a macro like this:
```fa
macro <name>
<code>
end
```
The indentation is optional but nice for
human radability
To expand a macro just type this:
```fa
%<name>
```
Example:
```fa
macro exit 60 sys 4 pop end
1 %exit
```
This program exits with a supplied code