example: template hygienic(val: expr) = var `*x` = val echo `*x` *x was chosen as mnemonic for "opposite of public" and thus private
12 lines
124 B
Nim
12 lines
124 B
Nim
template hygienic(val: expr) =
|
|
var `*x` = val
|
|
stdout.write `*x`
|
|
|
|
var x = 100
|
|
|
|
hygienic 1
|
|
hygienic 2
|
|
hygienic 3
|
|
|
|
echo x
|
|
|