[honu] add some simple macro examples
This commit is contained in:
parent
9f81387e85
commit
786436b314
|
@ -6,3 +6,14 @@ testx 5 * 2
|
|||
|
||||
for z = 1 to testx 5 * 2 do
|
||||
printf("z is ~a\n", z)
|
||||
|
||||
macro testfor () {x:expression} {
|
||||
syntax(for z = 1 to x_result do
|
||||
printf("z is ~a\n" z))
|
||||
}
|
||||
|
||||
macro testfor2 () {x:expression}{
|
||||
syntax(testfor x_result * 2)
|
||||
}
|
||||
|
||||
testfor2 1 + 2
|
||||
|
|
Loading…
Reference in New Issue
Block a user