annotate src/ploki/examples/ref.pk @ 5983:e9e46956a506
<oerjan> mk wisdom/welcome.sv//Hej och v\xc3\xa4lkommen till den internationella knutpunkten f\xc3\xb6r esoterisk programmeringsspr\xc3\xa5ksdesign och -drifts\xc3\xa4ttning! F\xc3\xb6r mer information, se v\xc3\xa5r wiki: <http://esolangs.org/>. (F\xc3\xb6r den andra sortens esoterism, pr\xc3\xb6va #esoteric p\xc3\xa5 EFnet eller DALnet.)
author |
HackBot |
date |
Mon, 14 Sep 2015 17:49:06 +0000 |
parents |
ac0403686959 |
children |
|
rev |
line source |
4223
|
1 GOTO 496
|
|
2 FOR *&ref-assign*& LET $(\@ . 0) \@ . 1
|
|
3 KTHX \@ . 1
|
|
4 FOR *&ref-call&* LEET id \@ . 0
|
|
5 LEET arg \@ . 1
|
|
6 IF \L arg : "set"
|
|
7 LEET ref $$ref$$(id)
|
|
8 KTHX @OMFG @*&ref-assign*& #<ref \@#>
|
|
9 FI
|
|
10 KTHX $($$ref$$(id))
|
|
11 FOR ref LEET val \@
|
|
12 LET $$ref$cnt$$ += 1
|
|
13 LEET ref @OMFG @*&ref-call&* #<$$ref$cnt$$ \@#>
|
|
14 LET $$ref$$($$ref$cnt$$) ref
|
|
15 LET $(ref) \@
|
|
16 KTHX ref
|
|
17 496 #!
|