annotate src/ploki/examples/ref.pk @ 12335:040020ba3072
draft
<int-e> learn The password of the month is peeping Tom.
author |
HackEso <hackeso@esolangs.org> |
date |
Mon, 01 Jun 2020 00:25:46 +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 #!
|