annotate src/ploki/examples/fibcheck.pk @ 9220:52758a71887f
<shachaf> fetch http://mirror.keystealth.org/gnu/wdiff/wdiff-latest.tar.gz
author |
HackBot |
date |
Mon, 10 Oct 2016 22:57:12 +0000 |
parents |
ac0403686959 |
children |
|
rev |
line source |
4223
|
1 #!../ploki
|
|
2 REM fibonacci sequence tester
|
|
3 REM sample input:
|
|
4 REM x x xx xxx xxxxx
|
|
5 REM x x x
|
|
6 FOR line LET line @LEGS \EING
|
|
7 IF line ; ""
|
|
8 IF line ~ "^s!*({[S!|[{S!}|[2!|1![1]?]{0!}[2]?][0]?]}s!+)+$"
|
|
9 "fibonacci sequence!
|
|
10 ELSE
|
|
11 "nope...
|
|
12 FI
|
|
13 NEXT line
|
|
14 FI
|