about summary refs log tree commit diff stats
path: root/js/games/nluqo.github.io/~bh/logo-sample.html
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2023-08-23 07:52:19 -0400
committerelioat <elioat@tilde.institute>2023-08-23 07:52:19 -0400
commit562a9a52d599d9a05f871404050968a5fd282640 (patch)
tree7d3305c1252c043bfe246ccc7deff0056aa6b5ab /js/games/nluqo.github.io/~bh/logo-sample.html
parent5d012c6c011a9dedf7d0a098e456206244eb5a0f (diff)
downloadtour-562a9a52d599d9a05f871404050968a5fd282640.tar.gz
*
Diffstat (limited to 'js/games/nluqo.github.io/~bh/logo-sample.html')
-rw-r--r--js/games/nluqo.github.io/~bh/logo-sample.html69
1 files changed, 69 insertions, 0 deletions
diff --git a/js/games/nluqo.github.io/~bh/logo-sample.html b/js/games/nluqo.github.io/~bh/logo-sample.html
new file mode 100644
index 0000000..bffecdd
--- /dev/null
+++ b/js/games/nluqo.github.io/~bh/logo-sample.html
@@ -0,0 +1,69 @@
+<HTML>
+<HEAD>
+<TITLE>Sample Logo program</TITLE>
+</HEAD>
+<BODY>
+<H1>Sample Logo program</H1>
+
+<P>Here is a short but complete program in Berkeley Logo:
+
+<PRE>
+to choices :menu [:sofar []]
+if emptyp :menu [print :sofar stop]
+foreach first :menu [(choices butfirst :menu sentence :sofar ?)]
+end
+</PRE>
+
+<P>And here's how you use it.  You type
+
+<PRE>
+choices [[small medium large]
+         [vanilla [ultra chocolate] lychee [rum raisin] ginger]
+         [cone cup]]
+</PRE>
+
+<P>and Logo replies
+
+<PRE>
+small vanilla cone
+small vanilla cup
+small ultra chocolate cone
+small ultra chocolate cup
+small lychee cone
+small lychee cup
+small rum raisin cone
+small rum raisin cup
+small ginger cone
+small ginger cup
+medium vanilla cone
+medium vanilla cup
+medium ultra chocolate cone
+medium ultra chocolate cup
+medium lychee cone
+medium lychee cup
+medium rum raisin cone
+medium rum raisin cup
+medium ginger cone
+medium ginger cup
+large vanilla cone
+large vanilla cup
+large ultra chocolate cone
+large ultra chocolate cup
+large lychee cone
+large lychee cup
+large rum raisin cone
+large rum raisin cup
+large ginger cone
+large ginger cup
+</PRE>
+
+<P>The program doesn't have anything about the size of the menu
+built in.  You can use any number of categories, and any number of
+possibilities in each category.  Let's see you do <EM>that</EM> in
+four lines of Java!
+
+<P><ADDRESS>
+<A HREF="index.html"><CODE>www.cs.berkeley.edu/~bh</CODE></A>
+</ADDRESS>
+</BODY>
+</HTML>