Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created June 23, 2011 23:55
Show Gist options
  • Save jnthn/1043926 to your computer and use it in GitHub Desktop.
Save jnthn/1043926 to your computer and use it in GitHub Desktop.
C:\Consulting\rakudo\parrot>type nl.pir
.sub 'main' :main
'il'()
'nl'()
'sl'()
.end
.sub 'il'
.lex '$i', $I0
store_lex '$i', 42
$I1 = find_lex '$i'
say $I1
'il_fetch'()
.end
.sub 'il_fetch' :outer('il')
$I0 = find_lex '$i'
say $I0
.end
.sub 'nl'
.lex '$n', $N0
store_lex '$n', 6.9
$N1 = find_lex '$n'
say $N1
'nl_fetch'()
.end
.sub 'nl_fetch' :outer('nl')
$N0 = find_lex '$n'
say $N0
.end
.sub 'sl'
.lex '$s', $S0
store_lex '$s', 'Staropramen'
$S1 = find_lex '$s'
say $S1
'sl_fetch'()
.end
.sub 'sl_fetch' :outer('sl')
$S0 = find_lex '$s'
say $S0
.end
C:\Consulting\rakudo\parrot>parrot nl.pir
42
42
6.9
6.9
Staropramen
Staropramen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment