minor example updates

FossilOrigin-Name: c876dd12435c8509038c8ca1e02becf0f92ed23d087c031ad543254b4fe53bb6
This commit is contained in:
crc 2019-08-12 17:00:59 +00:00
parent 330d8e2340
commit 9792353444
2 changed files with 5 additions and 5 deletions

View file

@ -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
~~~

View file

@ -40,7 +40,7 @@ on the stack.
:link dup '<a_href="/examples/%s.html">%s</a>_ s:format s:put ;
:link2 '<a_href="/examples/%s.glossary"><br>&rarr;_glossary</a> 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 '<body> s:put call '</body> 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
~~~