From 979235344472d67e4df6bf2879fc775496926b96 Mon Sep 17 00:00:00 2001 From: crc Date: Mon, 12 Aug 2019 17:00:59 +0000 Subject: [PATCH] minor example updates FossilOrigin-Name: c876dd12435c8509038c8ca1e02becf0f92ed23d087c031ad543254b4fe53bb6 --- example/Primes.forth | 2 +- example/publish-examples.forth | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/Primes.forth b/example/Primes.forth index c3742f4..27df3a9 100644 --- a/example/Primes.forth +++ b/example/Primes.forth @@ -18,7 +18,7 @@ And a test: ~~~ :create-set (-a) - here #3000 , #2 #3002 [ dup , n:inc ] times drop ; + here #1000 , #2 #1002 [ dup , n:inc ] times drop ; create-set get-primes [ n:put sp ] a:for-each ~~~ diff --git a/example/publish-examples.forth b/example/publish-examples.forth index a3ffca6..1221061 100755 --- a/example/publish-examples.forth +++ b/example/publish-examples.forth @@ -40,7 +40,7 @@ on the stack. :link dup '%s_ s:format s:put ; :link2 '
→_glossary s:format s:put $. c:put ; -:links dup '.forth s:ends-with? [ [ dup link link2 ] li ] if; drop ; +:links dup '.forth s:ends-with? over '.retro s:ends-with? or [ [ dup link link2 ] li ] if; drop ; :body ' s:put call ' s:put ; :make dtd head body ; ~~~ @@ -58,7 +58,7 @@ FILE-PATH 'index.html s:append file:W file:open !FID # Generate HTML Files ~~~ -:export dup '.forth s:ends-with? &drop -if; +:export dup '.forth s:ends-with? over '.retro s:ends-with? or &drop -if; FILE-PATH over './export-as-html.forth_%s_>%s%s.html s:format unix:system $. c:put ; @@ -68,9 +68,9 @@ FILE-PATH 'index.html s:append file:W file:open !FID # Generate a Glossary File For Each ~~~ -:glossary dup '.forth s:ends-with? &drop -if; +:glossary dup '.forth s:ends-with? over '.retro s:ends-with? or &drop -if; FILE-PATH over 'retro-document_%s_>%s%s.glossary s:format unix:system $. c:put ; -[ dir? &drop &glossary choose ] unix:for-each-file +[ dir? &drop &glossary choose ] unix:for-each-file nl ~~~