Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Appendices
299
Getting Berkeley Logo
A Running Berkeley Logo
anarres.cs.berkeley.edupub/ucblogo
blogo.exe
One of my reasons for writing a second edition of these books was that all of the Logointerpreters described in the first edition are now obsolete. Current commercial Logoimplementations are quite different in their user interface from those traditional versions.Those differences make newer Logo implementations more immediately accessible tochildren who want to produce animated graphics, but in many cases the changes havemade the kind of programming I do in these books harder.
My solution has been to produce, along with some of my students, a Logo interpreterthat is available free of charge for most popular computers. The design goal of BerkeleyLogo has been that a program written for one kind of computer should run entirelyunchanged on any other kind. Still, there are slight differences in the user interface andin the installation process, and this appendix discusses those differences. Since BerkeleyLogo is distributed with source files, I hope that as new computers and operating systemscome along, some enthusiast will make Berkeley Logo available for them even if I don’tcatch them all.
Still, people who are using some other version of Logo for other purposes might wellwant to use these books to help them learn more advanced Logo ideas. The programs inthis first volume can be adapted to current commercial Logo dialects with some effort. Inthe later volumes I rely more heavily on features that are available only in Berkeley Logo.
Berkeley Logo is available over the Internet, or on diskette from the MIT Press. On theInternet, make an anonymous FTP connection to andlook in the directory . The relevant files are
Self-extracting archive for DOS machines.
Berkeley Logo for DOS Machines
300 Appendix A Running Berkeley Logo
http://www.cs.berkeley.edu/~bh/
blogo -d c:\
ucblogo.sea.hqxucblogo.tar.Z tar
sources
a:install b:installucblogo blogo.exe
-d
ucblogo.exe
bl.exe
ucblogo.exe zpm.exeZpm
set DOS16M=1set DOS16M=5set DOS16M=6
BinHex self-extracting archive for Macintosh.Compressed archive for Unix.
The files should be transferred in binary (image) mode.
Pointers to these files can also be found on my Web page:
For a diskette, use the order form enclosed with this book.
Within the Logo distribution is a subdirectory (or folder, if you’re a Mac person)called . This contains the C language source files for the Logo interpreter. Ifdisk space is tight, you don’t need these files to run Logo; they are provided for peoplewho want to extend the Logo interpreter or implement it for a different computer system.
If you got Berkeley Logo on diskette, to extract the files you put the diskette in your A orB drive and give the command or . This will create a directorynamed on your C drive. If you got the file from the Internet, typethe command
to expand the archive. Don’t forget the .
Berkeley Logo is provided in two executable versions:
runs on 286-and-up processors, and uses extended memory if you haveit, so you can run large Logo programs.
runs on any PC, but is limited to 640K. That’s not big enough for someof the larger projects in the later volumes.
In order to run you must have the file (which is provided)in your DOS path. has to figure out what kind of extended memory interface youhave, and in some cases it needs help. You must use the DOS command
for NEC 98-seriesfor Fujitsu FMR-60 or 70for ATT 6300 Plus
xxxx
xxxx
Berkeley Logo for DOS Machines 301
set DOS16M=7set DOS16M=13set DOS16M=INBOARD
set DOS16M=10
Ucblogo bl
TOSHIBAVGA12
bl ucblogoVESA1
pckscrnucl.bat
edit
EDITOR
set FG DISPLAY=
CGAHIRES, CGAMEDRES, EGACOLOR, EGAECD, EGAMONO, EGALOWRES,HERC, ORCHIDPROHIRE, PARADISEHIRES, TOSHIBA, TRIDENTHIRES,VEGAVGAHIRES, VESA6A, VESA2, VGA11, VGA12, VGA13, 8514A
for old Phoenix BIOS versionsfor Zenith Z-24X with old BIOSfor 386 with Intel Inboard
Even if UCBLOGO runs correctly for you without any of these settings (which willbe the case for most machines) you might try
for faster performance on some systemsbut slower on others – experiment.
and also usually figure out correctly what kind of graphics board youhave. But for some obscure clones with nonstandard graphics you might have to tell itwhich graphics mode to use. This is also done with a DOS command:
where is the board type and mode, one of the following:
I don’t know anything about any of these except that is for a T3100 anddoesn’t work on my T1200XE. I use on my generic clone.
There are some graphics modes that will work with but not with ,including for 256 colors of 640x480.
Finally, note that Logo writes directly to the screen and is therefore incompatiblewith “screen accelerator” TSRs. (For example, my PC comes with one calledand I had to turn it off before running Logo.) The file is a sample batch filethat I use to disable the screen accelerator, run Logo, then re-enable it. If you have adifferent screen accelerator you’ll need different commands, of course, but the idea isthe same.
Ctrl-break or ctrl-Q means stop, ctrl-W means pause.
The Logo command runs a separate editor, starting that editor with a filecontaining your selected procedures. Logo will use whatever editor you want, if there isan variable in your DOS environment. By default, Logo uses Jove, a version ofEMACS, which is provided with Logo. This version of Jove is set up so that typing ctrl-Cwill save the file and return to Logo. You need to put
Berkeley Logo for the Macintosh
302 Appendix A Running Berkeley Logo
autoexec.bat Cmds.doc
bl.exe
ucblogo.exeucblogo
UCB Logo
Edit
splitscreen fullscreen textscreen
SET JOVERC=C:\UCBLOGO\JOVE\JOVE.RCSET DESCRIBE=C:\UCBLOGO\JOVE\CMDS.DOC
SET LOGOLIB=C:\UCBLOGO\LOGOLIB\
http://www.ultranet.com/~mills/
in your or something so that Jove will start up right. is theJove reference manual, used for its online help.
You also need
(yes, ending with backslash) in your autoexec.bat so that Logo can find its library files.
The version of Logo can be run in a DOS window under Windows, butit can do graphics only in full-screen mode. For the larger projects, exit Windows andrun under DOS. (In Windows 95, this can be made automatic if youinstall as a “DOS mode” program.) There is an offshoot of Berkeley Logocalled MSWLogo, written by George Mills, specifically for Windows. It has a morepoint-and-click style interface, and doesn’t work well with those projects that make heavyuse of reading from the keyboard or controlling the position of text on the screen; theSolitaire and Cryptographer’s Helper projects in Volume 2 and the finite state machinesimulator in Volume 3 are most problematic. But for general use, MSWLogo is a goodoption for Windows users. The easiest way to get it is from George Mills’ Web page:
If you got Berkeley Logo on diskette, insert the diskette in your drive, copy the one fileonto your hard disk, and then double-click on it to install the folder. If yougot Logo from the Internet, you must first convert the BinHex format to an executablefile; many file transfer programs do this automatically.
Command-period means stop; command-comma means pause.
On the Mac, Berkeley Logo includes a very simple-minded editor built into Logoitself. It works in the usual Macintosh way; when you have finished editing, you can select“accept editor changes” or “cancel editor changes” from the menu.
Macintosh users will find the Berkeley Logo user interface disconcerting, becauseit was designed to be Logo-like rather than Macintosh-like. For example, you shoulduse the Logo commands , , and to rearrangeLogo’s text and graphics windows, rather than trying to resize them with the mouse.
edit EDITOR
Berkeley Logo for Unix
Berkeley Logo for Unix 303
Since there are so many different versions of Unix, Berkeley Logo is distributed in sourceform, and must be compiled for your particular machine. A Gnu Autoconf configurationfile is provided, so the compilation process should be reasonably automatic. The X11library is required for turtle graphics.
Logo uses your system’s interrupt character for stop, and your system’s quit characterfor pause.
For the command, Logo uses whatever program is specified in yourenvironment variable. If your editor exits with nonzero status (indicating an error) thenLogo will not carry out the changes indicated in the edited file.
305
B GNU General Public License
The following software license, written by the Free Software Foundation, applies toBerkeley Logo and to the Logo programs in this book. I chose to use this license in orderto encourage the free sharing of software—my own and, I hope, yours.
GNU GENERAL PUBLIC LICENSEVersion 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation,Inc.675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatimcopies of this license document, but changing it isnot allowed.
Preamble
The licenses for most software are designed totake away your freedom to share and change it. Bycontrast, the GNU General Public License is intendedto guarantee your freedom to share and change freesoftware—to make sure the software is free for all itsusers. This General Public License applies to mostof the Free Software Foundation’s software and toany other program whose authors commit to usingit. (Some other Free Software Foundation software iscovered by the GNU Library General Public Licenseinstead.) You can apply it to your programs, too.
When we speak of free software, we are referringto freedom, not price. Our General Public Licensesare designed to make sure that you have the freedomto distribute copies of free software (and charge forthis service if you wish), that you receive source codeor can get it if you want it, that you can change thesoftware or use pieces of it in new free programs; andthat you know you can do these things.
To protect your rights, we need to make restric-tions that forbid anyone to deny you these rights orto ask you to surrender the rights. These restric-
tions translate to certain responsibilities for you ifyou distribute copies of the software, or if you modifyit.
For example, if you distribute copies of such aprogram, whether gratis or for a fee, you must givethe recipients all the rights that you have. You mustmake sure that they, too, receive or can get the sourcecode. And you must show them these terms so theyknow their rights.
We protect your rights with two steps: (1) copy-right the software, and (2) offer you this license whichgives you legal permission to copy, distribute and/ormodify the software.
Also, for each author’s protection and ours, wewant to make certain that everyone understands thatthere is no warranty for this free software. If thesoftware is modified by someone else and passed on,we want its recipients to know that what they haveis not the original, so that any problems introducedby others will not reflect on the original authors’reputations.
Finally, any free program is threatened con-stantly by software patents. We wish to avoid thedanger that redistributors of a free program will in-dividually obtain patent licenses, in effect makingthe program proprietary. To prevent this, we havemade it clear that any patent must be licensed foreveryone’s free use or not licensed at all.
The precise terms and conditions for copying,distribution and modification follow.
GNU GENERAL PUBLIC LICENSE
306 Appendix B GNU General Public License
TERMS AND CONDITIONS FOR COPYING,DISTRIBUTION AND MODIFICATION
0. This License applies to any program or otherwork which contains a notice placed by the copy-right holder saying it may be distributed under theterms of this General Public License. The “Pro-gram”, below, refers to any such program or work,and a “work based on the Program” means either theProgram or any derivative work under copyright law:that is to say, a work containing the Program or aportion of it, either verbatim or with modificationsand/or translated into another language. (Here-inafter, translation is included without limitation inthe term “modification”.) Each licensee is addressedas “you”.
Activities other than copying, distribution andmodification are not covered by this License; they areoutside its scope. The act of running the Programis not restricted, and the output from the Program iscovered only if its contents constitute a work based onthe Program (independent of having been made byrunning the Program). Whether that is true dependson what the Program does.
1. You may copy and distribute verbatim copiesof the Program’s source code as you receive it, inany medium, provided that you conspicuously andappropriately publish on each copy an appropriatecopyright notice and disclaimer of warranty; keepintact all the notices that refer to this License andto the absence of any warranty; and give any otherrecipients of the Program a copy of this License alongwith the Program.
You may charge a fee for the physical act oftransferring a copy, and you may at your option offerwarranty protection in exchange for a fee.
2. You may modify your copy or copies of theProgram or any portion of it, thus forming a workbased on the Program, and copy and distribute suchmodifications or work under the terms of Section1 above, provided that you also meet all of theseconditions:
a) You must cause the modified files to carryprominent notices stating that you changed thefiles and the date of any change.
b) You must cause any work that you dis-tribute or publish, that in whole or in part con-tains or is derived from the Program or any partthereof, to be licensed as a whole at no charge toall third parties under the terms of this License.
c) If the modified program normally readscommands interactively when run, you must causeit, when started running for such interactive usein the most ordinary way, to print or display an an-
nouncement including an appropriate copyrightnotice and a notice that there is no warranty (orelse, saying that you provide a warranty) and thatusers may redistribute the program under theseconditions, and telling the user how to view a copyof this License. (Exception: if the Program itselfis interactive but does not normally print such anannouncement, your work based on the Programis not required to print an announcement.)
These requirements apply to the modified workas a whole. If identifiable sections of that work arenot derived from the Program, and can be reason-ably considered independent and separate works inthemselves, then this License, and its terms, do notapply to those sections when you distribute them asseparate works. But when you distribute the samesections as part of a whole which is a work based onthe Program, the distribution of the whole must beon the terms of this License, whose permissions forother licensees extend to the entire whole, and thusto each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claimrights or contest your rights to work written entirelyby you; rather, the intent is to exercise the rightto control the distribution of derivative or collectiveworks based on the Program.
In addition, mere aggregation of another worknot based on the Program with the Program (or witha work based on the Program) on a volume of astorage or distribution medium does not bring theother work under the scope of this License.
3. You may copy and distribute the Program (ora work based on it, under Section 2) in object code orexecutable form under the terms of Sections 1 and 2above provided that you also do one of the following:
a) Accompany it with the complete corre-sponding machine-readable source code, whichmust be distributed under the terms of Sections1 and 2 above on a medium customarily used forsoftware interchange; or,
b) Accompany it with a written offer, valid forat least three years, to give any third party, for acharge no more than your cost of physically per-forming source distribution, a complete machine-readable copy of the corresponding source code,to be distributed under the terms of Sections 1and 2 above on a medium customarily used forsoftware interchange; or,
c) Accompany it with the information you re-ceived as to the offer to distribute correspondingsource code. (This alternative is allowed only fornoncommercial distribution and only if you re-ceived the program in object code or executableform with such an offer, in accord with Subsectionb above.)
Appendix B GNU General Public License 307
The source code for a work means the preferredform of the work for making modifications to it. Foran executable work, complete source code means allthe source code for all modules it contains, plus anyassociated interface definition files, plus the scriptsused to control compilation and installation of theexecutable. However, as a special exception, thesource code distributed need not include anythingthat is normally distributed (in either source or bi-nary form) with the major components (compiler,kernel, and so on) of the operating system on whichthe executable runs, unless that component itselfaccompanies the executable.
If distribution of executable or object code ismade by offering access to copy from a designatedplace, then offering equivalent access to copy thesource code from the same place counts as distribu-tion of the source code, even though third partiesare not compelled to copy the source along with theobject code.
4. You may not copy, modify, sublicense, ordistribute the Program except as expressly providedunder this License. Any attempt otherwise to copy,modify, sublicense or distribute the Program is void,and will automatically terminate your rights underthis License. However, parties who have receivedcopies, or rights, from you under this License will nothave their licenses terminated so long as such partiesremain in full compliance.
5. You are not required to accept this License,since you have not signed it. However, nothing elsegrants you permission to modify or distribute theProgram or its derivative works. These actions areprohibited by law if you do not accept this License.Therefore, by modifying or distributing the Program(or any work based on the Program), you indicateyour acceptance of this License to do so, and allits terms and conditions for copying, distributing ormodifying the Program or works based on it.
6. Each time you redistribute the Program (orany work based on the Program), the recipient auto-matically receives a license from the original licensorto copy, distribute or modify the Program subject tothese terms and conditions. You may not impose anyfurther restrictions on the recipients’ exercise of therights granted herein. You are not responsible forenforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment orallegation of patent infringement or for any otherreason (not limited to patent issues), conditions areimposed on you (whether by court order, agreementor otherwise) that contradict the conditions of thisLicense, they do not excuse you from the conditionsof this License. If you cannot distribute so as tosatisfy simultaneously your obligations under this Li-
cense and any other pertinent obligations, then as aconsequence you may not distribute the Program atall. For example, if a patent license would not permitroyalty-free redistribution of the Program by all thosewho receive copies directly or indirectly through you,then the only way you could satisfy both it and thisLicense would be to refrain entirely from distributionof the Program.
If any portion of this section is held invalid orunenforceable under any particular circumstance,the balance of the section is intended to apply andthe section as a whole is intended to apply in othercircumstances.
It is not the purpose of this section to induce youto infringe any patents or other property right claimsor to contest validity of any such claims; this sectionhas the sole purpose of protecting the integrity ofthe free software distribution system, which is imple-mented by public license practices. Many peoplehave made generous contributions to the wide rangeof software distributed through that system in re-liance on consistent application of that system; it isup to the author/donor to decide if he or she is will-ing to distribute software through any other systemand a licensee cannot impose that choice.
This section is intended to make thoroughlyclear what is believed to be a consequence of the restof this License.
8. If the distribution and/or use of the Programis restricted in certain countries either by patentsor by copyrighted interfaces, the original copyrightholder who places the Program under this Licensemay add an explicit geographical distribution limita-tion excluding those countries, so that distributionis permitted only in or among countries not thusexcluded. In such case, this License incorporates thelimitation as if written in the body of this License.
9. The Free Software Foundation may publishrevised and/or new versions of the General PublicLicense from time to time. Such new versions will besimilar in spirit to the present version, but may differin detail to address new problems or concerns.
Each version is given a distinguishing versionnumber. If the Program specifies a version numberof this License which applies to it and “any laterversion”, you have the option of following the termsand conditions either of that version or of any laterversion published by the Free Software Foundation.If the Program does not specify a version numberof this License, you may choose any version everpublished by the Free Software Foundation.
10. If you wish to incorporate parts of theProgram into other free programs whose distributionconditions are different, write to the author to askfor permission. For software which is copyrighted
308 Appendix B GNU General Public License
<one line to give the program’s nameand a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you canredistribute it and/or modify it under the termsof the GNU General Public License as publishedby the Free Software Foundation; either version2 of the License, or (at your option) any laterversion.
This program is distributed in the hope that itwill be useful, but WITHOUT ANY WARRANTY;without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULARPURPOSE. See the GNU General Public License formore details.
You should have received a copy of the GNUGeneral Public License along with this program;if not, write to the Free Software Foundation,Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Gnomovision version 69,Copyright (C) 19yy name of authorGnomovision comes with ABSOLUTELY NO WARRANTY; fordetails type ‘show w’. This is free software, andyou are welcome to redistribute it under certainconditions; type ‘show c’ for details.
Yoyodyne, Inc., hereby disclaims all copyrightinterest in the program ‘Gnomovision’ (which makespasses at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989Ty Coon, President of Vice
by the Free Software Foundation, write to the FreeSoftware Foundation; we sometimes make exceptionsfor this. Our decision will be guided by the two goalsof preserving the free status of all derivatives of ourfree software and of promoting the sharing and reuseof software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSEDFREE OF CHARGE, THERE IS NO WARRANTYFOR THE PROGRAM, TO THE EXTENT PERMIT-TED BY APPLICABLE LAW. EXCEPT WHEN OTH-ERWISE STATED IN WRITING THE COPYRIGHTHOLDERS AND/OR OTHER PARTIES PROVIDETHE PROGRAM “AS IS” WITHOUT WARRANTY OFANY KIND, EITHER EXPRESSED OR IMPLIED, IN-CLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FIT-NESS FOR A PARTICULAR PURPOSE. THE EN-TIRE RISK AS TO THE QUALITY AND PER-FORMANCE OF THE PROGRAM IS WITH YOU.SHOULD THE PROGRAM PROVE DEFECTIVE,YOU ASSUME THE COST OF ALL NECESSARYSERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BYAPPLICABLE LAW OR AGREED TO IN WRIT-ING WILL ANY COPYRIGHT HOLDER, OR ANYOTHER PARTY WHO MAY MODIFY AND/OR RE-DISTRIBUTE THE PROGRAM AS PERMITTEDABOVE, BE LIABLE TO YOU FOR DAMAGES, IN-CLUDING ANY GENERAL, SPECIAL, INCIDENTALOR CONSEQUENTIAL DAMAGES ARISING OUTOF THE USE OR INABILITY TO USE THE PRO-GRAM (INCLUDING BUT NOT LIMITED TO LOSSOF DATA OR DATA BEING RENDERED INACCU-RATE OR LOSSES SUSTAINED BY YOU OR THIRDPARTIES OR A FAILURE OF THE PROGRAM TOOPERATE WITH ANY OTHER PROGRAMS), EVENIF SUCH HOLDER OR OTHER PARTY HAS BEENADVISED OF THE POSSIBILITY OF SUCH DAM-AGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want itto be of the greatest possible use to the public, thebest way to achieve this is to make it free softwarewhich everyone can redistribute and change underthese terms.
To do so, attach the following notices to theprogram. It is safest to attach them to the startof each source file to most effectively convey theexclusion of warranty; and each file should have atleast the “copyright” line and a pointer to where the
full notice is found.
Also add information on how to contact you byelectronic and paper mail.
If the program is interactive, make it output ashort notice like this when it starts in an interactivemode:
The hypothetical commands ‘show w’ and ‘showc’ should show the appropriate parts of the GeneralPublic License. Of course, the commands you usemay be called something other than ‘show w’ and‘show c’; they could even be mouse-clicks or menuitems—whatever suits your program.
You should also get your employer (if you workas a programmer) or your school, if any, to sign a“copyright disclaimer” for the program, if necessary.Here is a sample; alter the names:
This General Public License does not permitincorporating your program into proprietary pro-grams. If your program is a subroutine library, youmay consider it more useful to permit linking pro-prietary applications with the library. If this is whatyou want to do, use the GNU Library General PublicLicense instead of this License.
309
A
B
C
D
Index of Defined Procedures
This index lists example procedures whose definitions are in the text and procedures thatyou are asked to write in the text. The general index lists technical terms and primitiveprocedures.
65, 20771
250, 25489
203, 289279
127290
7575
13068
50279
279
280280
280
128128128
200196
196198
6759
44145, 164
181147
28970
140, 144, 158131, 135, 137, 138, 150, 151, 167
137137
132132
130127
about.computerspabsace.highpacronymaddupall.emptyalready.wonparabicask.onceask.thrice
best.movebetter.groupiebottombreadth.descendbreadth.first
childchildrenchildren1
choosechooseochoosexcodecodeletcodematchcodewordcolorcomputer.firstconversecountdown
dashdiamonddigitdigitpdowndownupdownup.manydownup.onedownup1downup2drawdraw.board
E
F
G
H
I
J
L
M
N
310 Index of Defined Procedures
127130130
231
184209, 218
97, 210, 211210
129129
129191
248, 254246, 253128
206246, 254
70
12839
67
44155, 156
20730
5
4689
57205
12778, 82, 89
140, 143, 144144
208243
66211232
232
204223, 232
208232
247, 254206
163
281126
164127
248, 254130
156164, 204
7, 72
57211
280248, 254
213202
drawlinedrawodrawx
encode
facefactfibfiblistfind.advancefind.forkfind.winfingersflushpfourpfreepfrenchfull.housepfullp
getmovegreetgroupie
halveshanoihasvowelphellohi
ignoreimportantpincrementindex
initinitialsinoutinout.subinrangepinsertintegerpitemitoj
jtoi
lengthletterletterpletterslocatelookuplovepoem
make.pathmake.triplesmanyprintmeplayminmovemovediskmultiplymusic.quiz
new.conversenewfibnewstatenogapnumber.namenumbers
O
P
Q
R
S
T
Index of Defined Procedures 311
64146, 152, 162
232247, 254
246, 254202
66281281
5959
129212225236
251212
252240, 244, 253
239, 246, 250187279
16343
2816
18976
7473
4974
244, 253241, 242
24170
231231
231129
282282
97281
281101, 232
9595
16248, 286
225, 231129129
281161
44207
190187
184186190188
6248, 254
208208
126202, 286
65246, 254
12750
oddpone.per.line
paircodepaircountpairppairuppast.tenseppath.movespath.stateperson.firstperson.movepickmovepiglatinplayfairplaygamepluralplwordpokerpoker.initpokerhandpolypourpraiseprimerprintformprocessprotect.headingprsecond
qaquadraticqueryquiz
ranknumread.card
read.cardsrealwordpremovereorderreorder1repeated.numberreplacereplace2reverseriverproomrotate
saysayrowscramblesecondsetkeywordsinglepsinglessizeslantsoap.operasort.beforepspinsquagglesquaresquigglesquirrelsquogglestartstraightpstripstrip.wordsubstitute.tripleswap
talkthreeptiedptop
U
V
W
Y
312 Index of Defined Procedures
7191, 192, 193
147159
126, 236
203140, 158
158, 160
20464, 205
281280
129281
203
127
total.quiztreetriangletruncatettt
uniqueupupdown
vowelcountvowelp
waterwinwin.nowpwin1wordify
youplay
313
A
B
C
General Index
and
arrayarraytolist
back
bf
bk
butfirstbutlast
cascade
clearscreencleartext
This index lists technical terms and primitive procedures. There is also an indexof defined procedures, which lists procedures whose definitions are in the text andprocedures that you are asked to write.
abbreviation 22Abelson, Hal xixabsolute value 71abstract data type 265actual argument 41algebraic equation 256algorithm 275allocation, storage xvanalytic geometry 182
69APL xviapprenticeship xiiArabic numeral 288argument 82argument, actual 41array xv, 115
116116
artificial intelligence 237assignment, indirect 57
181
BASIC 11, 48, 56, 170, 18622
Birch, Alison xix181
bottom-up 233bracket, square 19, 69breadth-first search 261, 263
2122
C++ xvCarter, Cindy xixCartesian coordinates 182
96character 21character string 19cipher, Playfair 219cipher, simple substitution 195Clancy, Michael xix
1802
cognitive psychology 104colon 40, 43, 55combiner 200
D
E
F
314 General Index
continue
count
csct
edit
emptypend
equalp
falsefd
filterfindfirst
forforeachforever
forwardfput
command 17compass heading 181composition of functions xvi, 15, 225computer graphics 179computer literacy xicomputer science xivconditional evaluation 64connective, logical 70constructor 23context 252, 295
294conversational front end 228coordinates 183coordinates, Cartesian 182
26Courant, Richard 259
1802
Dahl, O. J. 236Dao, Khang xxdata redundancy 223data representation 112, 264data structure 103data type, abstract 265datum 20Davidson, Larry xixDavis, Jim xixdebugging 245, 247, 283defensive programming 287defining a procedure 30depth-first search 261Descartes, Rene 182describe a procedure, how to 20Deutsch, Freeman xxdiagram, plumbing 15Dijkstra, Edsger 236Diophantine equation 257domain 82dots 40, 55dynamic scope 51
33editor 33effect 17efficiency 274elves 51, 167Elvish 196empty list 22empty word 22
6131
environment, programming 1equal sign 63
62equation, algebraic 256equation, Diophantine 257error message 16, 283evaluation 11expression 17expression, logical 70extra inputs 30
factorial 208faith 149
61180
Fibonacci sequence 96, 20988, 90, 203
9421
flag variable 119flat list 20
7994110
formal parameter 41Fortran xv
180200
fractal 191, 194frame 42, 47Free Software Foundation 305
G
H
I
J
K
LHave His Carcase
General Index 315
greaterp
heading
ififelseiffiffalseiftiftrue
item
last
left
lessp
list
listplisttoarray
local
Friedman, Batya xixfront end, conversational 228function 82function notation 30function, higher order 87functions, composition of xvi, 15, 225
geometry, analytic 182geometry, turtle 179Gilham, Fred xxglobal variable 56Goldenberg, Paul xixGoodman, Paul 74graph 258graphics, computer 179graphics, turtle 179
64
Hanoi, Tower of 153Harvey, Tessa xix
223heading 185
185heading, compass 181hierarchy of levels 174higher order function 87Hoare, C. A. R. 236
6466, 70, 247
6868
6868
increment 57, 79index variable 79indirect assignment 57infix arithmetic 29initialization procedure 144, 160, 240
input 12, 39inputs, extra 30instruction 2, 11, 17, 19instruction line 32instruction list 64intelligence, artificial 237interaction 44invocation 14, 28, 39, 49, 170IQ tests 255
23, 116iteration, numeric 78
joke 7, 47
Katz, Michael xxKatz, Yehuda xxkludge 29
22Latin, Pig 211
181Lennon, John 7, 74
64levels of recursion 192levels, hierarchy of 174Levington, David xixLewis, Phil xixlimit value 79Lisp xvi, xv, 237list 19
24list, empty 22list, flat 20
61116
literacy, computer xilittle person metaphor 51, 167
56local variable 51, 56, 138, 169
M
N
O
P
316 General Index
lputlt
makemapmap.se
memberp
not
numberp
or
output
pause
pd
pendownpenup
po
ponspopspos
potspr
product
locality 182logic, mathematical xvilogical connective 70logical expression 70Logo xvi, xv, 237
201, 288181
5584, 90
92mathematical logic xvimathematics xiiimatrix xvimember 21
63metaphor 5, 42, 51, 167Mills, George xxMinsky, Margaret xixmodularity 56, 109, 189most restrictive test 242
name 39, 5570
number 18, 62number, telephone 262
62numeral, Arabic 288numeral, Roman 288numeric iteration 78numerical operation 208
operation 17, 48, 61operation, numerical 208operation, recursive 195operation, selection 205
70origin 183Orleans, Doug xx
output 14, 17, 19548, 66, 73
Owings, Sanford xx
parallel processing 259parameter, formal 41parentheses 30, 63Pascal xv, 11, 237pattern 149, 164, 200, 205, 206pattern, procedure 163
294pausing 293
181pen 181
181181
Pig Latin 211planning, style of 233Playfair cipher 219plumbing diagram 15
32pocket 52
29332
185position 104, 185
3222
predicate 61predicate calculus xvipredicate, recursive 206prefix arithmetic 29primitive 12, 32
11, 49procedure 4, 11procedure pattern 163procedure, defining 30procedure, initialization 144, 160, 240procedure, top-level 45processing, parallel 259
14program 45programming environment 1
Q
R
S
T
General Index 317
pu
random
readcharreadlist
reduce
remainderrepeat
right
rtrun
sentence
sethsetheadingsetitemsetpos
step
stop
subsets
sum
programming, structured 236Prolog xviprompt 2, 5psychology, cognitive 104
181
question 61question, yes-or-no 61queue 263quotation mark 18, 55quote 18, 20
101range 82
12144
recursion 131recursion, levels of 192recursive call 138, 198recursive operation 195
89, 90, 203redundancy, data 223
1675
representation, data 112, 264restrictive test 242
182right to left 28Robbins, Herbert 259robot 180Roman numeral 288
182189
Sargent, Randy xxSayers, Dorothy L. 223scope of variables 49scope, dynamic 51search, breadth-first 261, 263
search, depth-first 261search, tree 259selection operation 205selector 23semantics 33sentence 20
23sequence of instructions 174
185185
116183
simple substitution cipher 195Solomon, Cynthia xixspace/time tradeoff 224square bracket 19, 69stack 267starting value 79state, turtle 185state-invariant 192statement types 11
293step, turtle 180stepping 175, 293
73, 171stop rule 138, 144, 151, 198, 285storage allocation xvstring, character 19structure, data 103structured programming 236style of planning 233subprocedure 45, 131subprocedure/superprocedure diagram
110214
substitution cipher, simple 19513
superprocedure 45symmetry 186syntax xv, 12, 33
tail recursion 145, 216telephone number 262
V
W
X
Y
318 General Index
What Is Mathematics?
test
thingthrow
to
trace
true
type
word
wordp
template 9268
test, most restrictive 242tests, IQ 255
40, 43295
tic-tac-toe 58, 103, 236title line 32
39top-down 233top-level procedure 45Tower of Hanoi 153trace 173
293tracing 173, 288, 293tree 191tree search 259
61turtle graphics 179turtle step 180turtle-relative 182Twenty Questions 61
141
value, limit 79value, starting 79van Blerkom, Dan xxvariable 39, 40, 49variable, flag 119variable, index 79variable, local 169variables in the workspace 119
Washington, George 74259
Wirth, Niklaus 237word 18
24word, empty 22
61Wright, Matthew xx, 117
x-coordinate 183
y-coordinate 183yes-or-no question 61Yoder, Sharon xix
General Index 319