@DataBase "AmigaTalk.guide" @REMARK "$VER: AmigaTalk.guide 1.9 (28-Jan-2002) by James T. Steichen @REMARK Written by Jim Steichen, Copyright (c) 1998-2002. @WIDTH 80 @WORDWRAP @NODE "Contents" "AmigaTalk.guide Table of Contents:" 1. @{" General Info " LINK "Main"} @{" Requirments " LINK "requirement"} @{" Distribution " LINK "distribution"} @{" Running the System " LINK "startup"} @{" Warranty " LINK "warranty"} @{" System Differences " LINK "SystemDifferences"} @{" Disk Configuration " LINK "DiskConfig"} @{" Known Bugs " LINK "Bugs"} 2. Program Controls: @{" ScreenShot of GUI " LINK "ATMainGUI.iff/Main"} @{" Command Line History " LINK "CommandHistory"} @{" Single Command Line " LINK "CommandLine"} @{" Parse Button " LINK "parsebutton"} @{" Status Window " LINK "StatusWindow"} @{" Status ScreenShot " LINK "ATStatus.iff/main"} @{" Menu Items " LINK "ATMenus"} PROJECT: @{" Load " LINK "LoadMI"} @{" Save " LINK "SaveMI"} @{" Save As " LINK "SaveAsMI"} @{" Quit " LINK "QuitMI"} @{" About " LINK "AboutMI"} @{" Help " LINK "HelpMI"} @{" Open Browser " LINK "OpenBrowserMI"} @{" Edit a File " LINK "EditaFileMI"} BEHAVIOR: @{" Debug " LINK "DebugMI"} @{" Trace " LINK "TraceMI"} @{" LeX print " LINK "LeXprintMI"} @{" silence " LINK "silenceMI"} @{" prallocs " LINK "prallocsMI"} @{" Enb Status " LINK "EnbStatusMI"} 3. @{" System Directives " LINK "SystemDirectives"} @{" )e " LINK "EditorSystemDirective"} @{" )g " LINK "GSystemDirective"} @{" )i " LINK "IncludeSystemDirective"} @{" )l " LINK "LoadSystemDirective"} @{" )r " LINK "ReadSystemDirective"} @{" )s " LINK "SaveSystemDirective"} @{" )! " LINK "ShellCommandDirective"} 4. Misc: @{" List of Examples " LINK "ExampleList"} @{" Parser Help " LINK "ParseHelp"} @{" ToolTypes " LINK "ToolTypes"} @{" User classes " LINK "UserClasses"} @{" Env File format " LINK "EnvFormat"} 5. @{" Appendix 1 " LINK "Appendix_1"} @{" Appendix 2 " LINK "Appendix_2"} @{" Appendix 3 " LINK "Appendix_3"} @{" Appendix 4 " LINK "Appendix_4"} @{" Author " LINK "Author"} @{" Bibliography " LINK "Bibliography.guide/Main"} @{" ToDo List " LINK "ToDoList"} @{" Disclaimers " LINK "Disclaimers"} @ENDNODE @NODE main "AmigaTalk© 1998-2001 User Manual:" @TOC "Contents" This manual is intended as an aid in using the @{B}AmigaTalk©@{UB} system. It is not intended to be used as an introduction to the SmallTalk language. @{B}AmigaTalk©@{UB} is largely (with exceptions listed in a later section) a subset of the @{B}SmallTalk-80*@{UB} language described in @{" SmallTalk blue " LINK "Bibliography.guide/OtherBooks"} A complete description of the classes included in the @{B}AmigaTalk@{UB} system and the messages they accept is given in @{" Appendix 1 " LINK "Appendix_1"} @{B}AmigaTalk@{UB} was generated from @{B}Little Smalltalk V1.0@{UB}, written by Timothy Budd. I know that there are more modern versions of Little Smalltalk in existence; however, they load & save system image files in a binary format that is @{B}not@{UB} documented. @{" How does the System relate to me? " LINK "SystemDiagram.br/main"} -- a Picture @{" Requirements " LINK "requirement"} What type of system do I need? @{" File System Configuration " LINK "DiskConfig"} @{" Warranty " LINK "warranty"} @{" Distribution " LINK "distribution"} @{" Startup " LINK "startup"} What can you do with @{B}AmigaTalk@{UB}? Check these out: @{" General Classes " LINK "GeneralClasses.guide/main"} @{" Intuition Classes " LINK "Intuition.guide/main"} @{" DataType Classes " LINK "DataType.guide/main"} @{" System Classes " LINK "System.guide/main"} @{" User Classes " LINK "UserClasses"} @{" TheBrowser© " LINK "TheBrowser.guide/main"} Browser OverView. @{" DocumentViewer© " LINK "ATHelper.guide/Main"} (Yes Virginia, Help is available!) @{" Main MenuItems " LINK "ATMenus"} @{" System Directives " LINK "SystemDirectives"} @{" System Differences " LINK "SystemDifferences"} @{" Appendix 2 " LINK "Appendix_2"} (Manual page) @{" Appendix 3 " LINK "Appendix_3"} (Example Class description) @{" Appendix 4 " LINK "Appendix_4"} (Primitive numbers) @{" Author " LINK "Author"} @{" Bibliography " LINK "Bibliography.guide/Main"} @{" Still to do... " LINK "ToDoList"} (Unfinished business) @{" Known BUGS " LINK "Bugs"} @{B}* Smalltalk-80 is a trademark of the Xerox Corporation.@{UB} @ENDNODE @NODE "StatusWindow" "Status Window:" @PREV "Contents" @NEXT "Main" This window displays error messages as well as the results of smalltalk expression evaluations. @ENDNODE @NODE "ATMenus" "AmigaTalk Menus:" The following links describe what the menu items do: PROJECT @{" Load... (A-L) " LINK "LoadMI"} @{" Save (A-S) " LINK "SaveMI"} @{" Save As... (A-A) " LINK "SaveAsMI"} @{" Quit (A-Q) " LINK "QuitMI"} ~~~~~~~~~~~~~~~~~~~~~~~ @{" About... (A-I) " LINK "AboutMI"} @{" Help... (A-H) " LINK "HelpMI"} ~~~~~~~~~~~~~~~~~~~~~~~ @{" Open Browser... (A-B) " LINK "OpenBrowserMI"} @{" Edit a file... (A-E) " LINK "EditaFileMI"} BEHAVIOR @{" Report Level » " LINK "ReportLevel"} @{" Display Requested Results only! (PRNTCMD=0) " LINK "ReportLevel0"} @{" Display Results of Expressions (Default)! " LINK "ReportLevel1"} @{" Display ALL Results! (PRNTCMD=2) " LINK "ReportLevel2"} @{" Debug " LINK "DebugMI"} @{" Trace " LINK "TraceMI"} @{" LeX print " LINK "LexprintMI"} @{" silence " LINK "silenceMI"} @{" prallocs " LINK "prallocsMI"} @{" Enb Status " LINK "EnbStatusMI"} (Default is 'Enabled status'). @ENDNODE @NODE "ReportLevel" "'Report Level »' MenuItems:" @PREV "ATMenus" @NEXT "ReportLevel0" These menu items will set the Level of result reporting in the Status window. These menuitems set an internal flag named @{" prntcmd " LINK "Appendix_2/LINE 33"}. SEE ALSO, @{" Level 0 " LINK "ReportLevel0"}, @{" Level 1 " LINK "ReportLevel1"},@{" Level 2 " LINK "ReportLevel2"} @ENDNODE @NODE "ReportLevel0" "Display Requested Results only! (PRNTCMD=0):" @PREV "ReportLevel" @NEXT "ReportLevel1" When this menu item is checked, the only results displayed in the status window will be from explicit print messages. SEE ALSO, @{" Level 1 " LINK "ReportLevel1"},@{" Level 2 " LINK "ReportLevel2"} @ENDNODE @NODE "ReportLevel1" "Display Results of Expressions (Default):" @PREV "ReportLevel0" @NEXT "ReportLevel2" When this menu item is checked, the results of every expression typed in the Command String Gadget will be displayed in the status window. SEE ALSO, @{" Level 0 " LINK "ReportLevel0"},@{" Level 2 " LINK "ReportLevel2"} @ENDNODE @NODE "ReportLevel2" "Display ALL Results! (PRNTCMD=2):" @PREV "ReportLevel1" @NEXT "ATMenus" When this menu item is checked, the results of ALL messages will be displayed in the status window. SEE ALSO, @{" Level 0 " LINK "ReportLevel0"},@{" Level 1 " LINK "ReportLevel1"} @ENDNODE @NODE "LoadMI" "Load MenuItem:" @PREV "ATMenus" @NEXT "SaveMI" This MenuItem is equivalent to the @{" )r system directive " LINK "ReadSystemDirective"}, except that it allows you to select a file of @{B}AmigaTalk@{UB} commands from an ASL File requester. @ENDNODE @NODE "SaveMI" "Save MenuItem:" @PREV "ATMenus" @NEXT "SaveAsMI" This MenuItem saves the commands in the command window into the last filename you used or will request that you select one if there hasn't been any file activity generated by you. @ENDNODE @NODE "SaveAsMI" "Save As MenuItem:" @PREV "ATMenus" @NEXT "QuitMI" This MenuItem is the same as the Save MenuItem, except that it will always request a filename for saving the commands in the command window in. @ENDNODE @NODE "QuitMI" "Quit MenuItem:" @PREV "ATMenus" @NEXT "AboutMI" This MenuItem will display a SanityCheck (C) requester before you will be allowed to exit the @{B}AmigaTalk@{UB} program. @ENDNODE @NODE "AboutMI" "About MenuItem:" @PREV "ATMenus" @NEXT "HelpMI" This MenuItem displays some basic information about the @{B}AmigaTalk@{UB} program. See Also, @{" ScreenShot " LINK "AboutReq.iff/main"} @ENDNODE @NODE "HelpMI" "Help MenuItem:" @PREV "ATMenus" @NEXT "OpenBrowserMI" This MenuItem Displays the @{B}AmigaTalk:Help@{UB} directory, allowing you to select a help/documentation file to view. @ENDNODE @NODE "OpenBrowserMI" "Open Browser MenuItem:" @PREV "ATMenus" @NEXT "EditaFileMI" This MenuItem will send you to the @{B}AmigaTalk@{UB} @{" system browser. " LINK "TheBrowser.guide/main"} @ENDNODE @NODE "EditaFileMI" "Edit a File MenuItem:" @PREV "ATMenus" @NEXT "DebugMI" This MenuItem is equivalent to the @{" )e system directive " LINK "EditorSystemDirective"}, except that it allows you to select a file to edit from the ASL File requester. @ENDNODE @NODE "DebugMI" "Debug MenuItem:" @PREV "ATMenus" @NEXT "TraceMI" This MenuItem toggles the debug flag @{" (DBGLEVEL) " LINK "Appendix_2"}, which allows debugging statements to be displayed. Alternatively, you can simply place a primitive call in a method () to accomplish the same thing. I recommend using the @{" Trace menuitem " LINK "TraceMI"} instead. @ENDNODE @NODE "TraceMI" "Trace MenuItem:" @PREV "ATMenus" @NEXT "LeXprintMI" This MenuItem toggles the traceByteCodes flag, which will ask you for a filename to place tracing statements in. Final (i.e., non-debugging) versions of @{B}AmigaTalk@{UB} do @{B}NOT@{UB} have this menu item. Use the T key instead. @{FG SHINE} NOTE: @{FG TEXT} This menuitem is NOT the same as pressing the T key while the command window is activated. The T (or t) key will open another window displaying tracing information, which is not saved. @ENDNODE @NODE "LeXprintMI" "LeX print MenuItem:" @PREV "ATMenus" @NEXT "silenceMI" This MenuItem toggles the lexprnt flag @{" (LEXDBG, formerly -z) " LINK "Appendix_2"}, which allows lexical debugging statements to be displayed. @ENDNODE @NODE "silenceMI" "silence MenuItem:" @PREV "ATMenus" @NEXT "prallocsMI" This MenuItem toggles the silence flag @{" (NOREFSUMMARY, formerly -s) " LINK "Appendix_2"}, which supresses output. @ENDNODE @NODE "prallocsMI" "prallocs MenuItem:" @PREV "ATMenus" @NEXT "EnbStatusMI" This MenuItem toggles the prallocs flag @{" (SUMMARY, formerly -a) " LINK "Appendix_2"}, which enables displaying final allocation statistics after the program exits. @ENDNODE @NODE "EnbStatusMI" "EnbStatus MenuItem:" @PREV "ATMenus" @NEXT "Contents" This MenuItem toggles the EnbStatus flag @{" (NOSTATUS, formerly -b) " LINK "Appendix_2"}, which opens/closes the Status window, located below the Command window (default is open). @ENDNODE @NODE "CommandHistory" "Command Line History:" @PREV "Contents" @NEXT "Main" This ListView gadget displays all the commands that have been entered into the @{" Single Command Line " LINK "CommandLine"} string gadget or certain menu selections. See Also, @{" ScreenShot of GUI " LINK "ATMainGUI.iff/Main"} @ENDNODE @NODE "CommandLine" "Single Command Line" @PREV "CommandHistory" @NEXT "Main" You may enter smalltalk expressions to be evaluated in this string gadget. See Also, @{" ScreenShot of GUI " LINK "ATMainGUI.iff/Main"} @ENDNODE @NODE ToDoList "Unfinished business:" The following parts of the @{B}AmigaTalk©@{UB} program still need work: 1. Verify that @{B}TheBrowser@{UB} is 100% bug-free. 2. Complete program documentation. 3. Write code for loading & saving system image files. (see @{" )l filename " LINK "LoadSystemDirective"} & @{" )s filename " LINK "SaveSystemDirective"}) 4. Need to add Class files (System/) for: @{B}Devices@{UB} @{" Audio " LINK "System.guide/AudioClass"} @{" Console " LINK "System.guide/ConsoleClass"} @{" Keyboard " LINK "System.guide/KeyboardClass"} @{" Input " LINK "System.guide/InputClass"} @{" SCSI " LINK "System.guide/SCSIClass"} @{" Processes " LINK "System.guide/ProcessesClass"} @{" Tasks " LINK "System.guide/TaskClass"} @{" Memory " LINK "System.guide/MemoryClass"} @{" Lists " LINK "System.guide/ListsClass"} @{" Interrupt " LINK "System.guide/InterruptClass"} @{" Semaphore " LINK "System.guide/SemaphoreClass"} @{" Signal " LINK "System.guide/SignalClass"} @{" Exception " LINK "System.guide/ExceptionClass"} @{" ARexx " LINK "System.guide/ARexxClass"} 5. Need to add Class files (Intuition/) for: @{" AreaPaint " LINK "Intuition.guide/AreaPaintClass"} @{" IStruct " LINK "Intuition.guide/IStructClass"} @{" Animation " LINK "Intuition.guide/AnimClass"} @ENDNODE @NODE UserClasses "User Classes for AmigaTalk© 1998:" The following user classes were written by me (@{" Author " LINK Author}) for the @{B}AmigaTalk@{UB} system & are documented herein: @{" Complex " LINK "Complex.guide/main"} @{" Curses " LINK "Curses.guide/main"} @{" Fraction " LINK "Fraction.guide/main"} @{" Graph " LINK "Graph.guide/main"} @{FG SHINE} Please feel free to dream up your own bunch of Classes to add to the system. @{FG TEXT} @ENDNODE @NODE Bugs "Bugs known to the Author of AmigaTalk:" The following bugs are inherited from the implementation of the @{B}Little Smalltalk@{UB} source code: 1. Assigning a block to a variable will usually cause memory reference cycles, resulting in the number of increments and decrements not being equal following execution. (not really a bug, caused by the implementation - blocks need to access the context, which includes the local variables, which includes the block, which needs to access the context ... ). 2. The stack size allocated by the parser is fixed. It should be computed by the parser and varied for different methods. 3. If you modify the class @{B}AmigaTalk@{UB} (and thereby the pseudo-variable @{I}amigatalk@{UI}) the pseudo-variable does not get properly initialized. 4. Because of bootstrapping peculiarities, a few classes (such as @{B}Object or Symbol or String@{UB}) do not respond to the message @{B}variables@{UB} correctly. 5. The @{" Parser " LINK "ParseHelp"} is @{B}NOT@{UB} smart enough to recognize when you've created a conflict with the names of variables. Example: Class Broken :Object ! @{FG SHINE}nameConflict@{FG TEXT} @{B}secondConflict@{UB} ! [ firstMethod: @{FG SHINE}nameConflict@{FG TEXT} ! @{B}secondConflict@{UB} ! ... ] Make sure that instance variables & method parameters don't have the same name. The Parser will compile your Class without complaining but there will be a run-time error in your class that won't be easy to find! 6. If there's an error in a Class file & you add it to the @{B}AmigaTalk@{UB} system by typing in: @{B})i AmigaTalk:User/ErrClass.st@{UB}, the error won't be reported to you, so you should try & @{" parse " LINK "ParseHelp"} it from a CLI or Shell to make sure that your Class file is error-free before using it inside @{B}AmigaTalk@{UB}. @ENDNODE @NODE ParseHelp "How to use the Parser:" The @{B}parse@{UB} program is located in @{FG SHINE}AmigaTalk:C/Parse@{FG TEXT}. Currently, you can only use the parser from a CLI or Shell (porting it to a GUI is left as an exercise for the reader ;) @{FG SHINE} SYNOPSIS @{FG TEXT} parse [-hex] inputClassFile.st outputParsedClass.p @{FG SHINE} OPTIONS @{FG TEXT} The only option that @{B}parse@{UB} recognizes is @{B}-hex@{UB}, which will tell the parser to generate bytecodes in @{B}AmigaTalk@{UB}-hexadecimal notation (example: @{B}16rF3@{UB}). This is used by the @{" Author " LINK "Author"} for debugging purposes. @{FG SHINE} INPUTS @{FG TEXT} The input to @{B}parse@{UB} is a Class(es) definition file (see @{FG SHINE}General/Pen.st@{FG TEXT} for an example). @{FG SHINE} OUTPUT @{FG TEXT} The output generated by @{B}parse@{UB} can be read by the @{B}AmigaTalk@{UB} program, which will add the Class to its internal Class Dictionary, so that you can use it from the GUI (see @{FG SHINE}System/system.p@{FG TEXT} for an example). I will investigate a possible method for getting Parser error messages to print into the AmigaTalk Status window. For now, you will have to check the Workbench for any error messages from the Parser. @ENDNODE @NODE DiskConfig "File System Configuration:" Simply click on the @{B}AmigaTalk@{UB} Install Icon to install the program. This is the layout of the AmigaTalk environment that you need to have in order to suppress un-wanted requester activity: Assign AmigaTalk: to a directory or partition: DH0:AmigaTalk/ (example) @{FG SHINE} AmigaTalk -- The main program. AmigaTalk.info -- The main program icon. AmigaTalk.env -- The Screen & Window startup values. (See @{" DisplayEnvFile " LINK "ToolTypes"}) @{FG TEXT} @{FG SHINE}Sub-directories of AmigaTalk:@{FG TEXT} Browser/ @{B}The user should NOT play with the@{UB} GeneralClasses @{B}files in this directory, TheBrowser@{UB} GeneralClassInstanceVars @{B}uses these files & expects a certain@{UB} IntuitionClasses @{B}structure to them. TheBrowser & @{UB} IntuitionClassInstanceVars @{B}AmigaTalk will maintain them for you.@{UB} SystemClasses SystemClassInstanceVars UserClasses UserClassInstanceVars C/ AmigaTalk.iff (See @{"LOGO, (formerly -i) command switch" LINK "Appendix_2"}) DisplayLogo (See @{"LOGO, (formerly -i) command switch" LINK "Appendix_2"}) @{" Parse " LINK "ParseHelp"} - Part of the Original @{B}Little SmallTalk@{UB} system. @{" TheBrowser " LINK "TheBrowser.guide/Main"} - CanDo Class-Browsing deck. TheBrowser.info CodeLib/ CodeLib/ is Currently empty. Examples/ Original Little-Smalltalk examples @{" Examples " LINK "ExampleList"} (see @{" Tim Budd's book " LINK "Bibliography.guide/Main"} Help/ AmigaTalk.guide - This file. AmigaTalk.guide.info @{" ATHelper.guide " LINK "ATHelper.guide/Main"} - Shows list of Help guides. @{" Bibliography.guide " LINK "Bibliography.guide/Main"} @{" DataType.guide " LINK "DataType.guide/Main"} @{" GeneralClasses.guide " LINK "GeneralClasses.guide/Main"} @{" Intuition.guide " LINK "Intuition.guide/Main"} @{" System.guide " LINK "System.guide/Main"} @{" ATMainGUI.iff " LINK "ATMainGUI.iff/Main"} - ScreenShot @{" ATStatus.iff " LINK "ATStatus.iff/Main"} - ScreenShot @{" AboutReq.iff " LINK "AboutReq.iff/Main"} - ScreenShot @{" ATBMain.iff " LINK "ATBMain.iff/Main"} - ScreenShot @{" ATBEd.iff " LINK "ATBEd.iff/Main"} - ScreenShot @{" ATBEdTT.iff " LINK "ATBEdTT.iff/Main"} - ScreenShot @{" ATBAdd.iff " LINK "ATBAdd.iff/Main"} - ScreenShot @{" ATBDel.iff " LINK "ATBDel.iff/Main"} - ScreenShot @{" ATBWarn.iff " LINK "ATBWarn.iff/Main"} - ScreenShot @{" ATHB.iff " LINK "ATHB.iff/Main"} - ScreenShot @{" SystemDiagram.iff " LINK "SystemDiagram.iff/Main"} A picture of how the program is connected. User-supplied (meaning the Author) Classes: @{" Complex.guide " LINK "Complex.guide/Main"} @{" Curses.guide " LINK "Curses.guide/Main"} @{" Fraction.guide " LINK "Fraction.guide/Main"} @{" Graph.guide " LINK "Graph.guide/Main"} @{" TheBrowser.guide " LINK "TheBrowser.guide/Main"} @{" ATalkARexx.guide " LINK "ATalkARexx.guide/Main"} General/ (Source files for general classes) AmigaTalk.st Replacement for SmallTalk.st Array.st ArrayedCollection.st These files are mostly identical to the Bag.st originals that came with the Little- Block.st Smalltalk V1.0 distribution. Most of the Boolean.st changes that I've made are to make the ByteArray.st code more readable. There are also some Char.st additional methods to make the General Class.st Classes more accessible to @{B}AmigaTalk@{UB}. Collection.st Dictionary.st False.st File.st Float.st Form.st Integer.st Interval.st KeyedCollection.st larray.st For bootstrapping purposes only. List.st Magnitude.st Number.st Object.st The Mother of all Classes. Pen.st A Total re-write to @{B}AmigaTalk@{UB} Plot3. Point.st Process.st Radian.st Random.st Semaphore.st SequenceableCollection.st Set.st String.st Symbol.st True.st UndefinedObject.st Intuition/ intuition.p Prelude/ standard symbols Where all of your junk accumulates. Symbols.original To reset symbols, execute: @{FG SHINE} Copy Symbols.original TO Symbols @{FG TEXT} TestFiles/ Too many to list @{B}Use the Load menuitem from the main AmigaTalk window to load & Execute the commands contained in these files to test & see what AmigaTalk can do! @{UB} System/ system.p User/ Complex.st Curses.st Fraction.st Graph.st Parse.scp (Script for parsing User Classes) @ENDNODE @NODE "ExampleList" "Examples from Little-Smalltalk V1.0:" The following examples are from the Original Little-Smalltalk V1.0 distribution. They are also used in Tim Budd's book, "A Little Smalltalk" (see @{" Bibliography " LINK "Bibliography.guide/MyBibliography"} 8queen.st basic.st blocks.st CheckBook.st CheckSuper.st collect.st Conditionals.st ControlAGenerator.st copy.st DiningPhilosophers.st DiscreteProbability.st Fibonacci.st file.st fork.st generator.p generator.st IceCreamStoreSim.st new.st num.st penshow.st Plane.p plane.st prime.st prime3.st prime4.st primes.st prob.st sim1.st sim2.st sim3.st super.st temp.st TuringMachineSim.st visitor.st @ENDNODE @NODE requirement "AmigaTalk requirements:" @NEXT distribution @PREV main @{B}REQUIREMENTS ~~~~~~~~~~~~@{UB} AmigaTalk uses DeckBrowser which is Copyrighted (c) by InovaTronics. If you don't have DeckBrowser or the necessary @{B}CanDo!@{UB} libraries & you still want to use @{" TheBrowser " LINK "TheBrowser.guide/Main"}, contact me & I'll try to send you some help. 68040 or better microprocessor. (68000 or 68020 versions available upon request) AmigaDOS 3.5+ Hard disk. @ENDNODE @NODE warranty "NO warranty for AmigaTalk:" @PREV main @NEXT requirement @{B}NO WARRANTY ~~~~~~~~~~~@{UB} There is no warranty for this software package. Although the @{" Author " LINK "Author"} has tried to prevent errors, he can't guarantee that the software package described in this document is 100% reliable. In fact, I can certainly guarantee that there are some problems in the code. You are therefore using this material at your own risk. The author cannot be held responsible for any damage which is caused by using this software package. @{FG SHINE}Hey, what do you want for free?@{FG TEXT} (See @{" Disclaimers " LINK "Disclaimers"}) I would appreciate any bug reports & I would suggest that you send them via e-mail to my attention: @{B}jimbot@rconnect.com@{UB} @ENDNODE @NODE Disclaimers "If it don't work, you're to blame:" @PREV warranty @{FG SHINE} You get to figure out which ones apply to this program ;) @{FG TEXT} No other warranty expressed or implied. List was current at time of printing. This supersedes all previous notices. This information is subject to change without notice. All rights reserved. Do not purchase if seal has been tampered with. Contents under pressure. Do NOT incinerate. Some assembly required. List each check separately by bank number. Batteries not included. Some settling of contents may occur during shipping. Use only as directed. Do not use while operating a motor vehicle or heavy equipment. This product is meant for educational purposes only. Postage will be paid by addressee. This is not an offer to sell securities. Apply only to affected area. May be too intense for some viewers. Do not stamp. For recreational use only. All models over 18 years of age. If condition persists, consult your physician. No user-serviceable parts inside. Times approximate. Simulated picture. Breaking seal constitutes acceptance of agreement. One size fits all. Contains a substantial amount of non-tobacco ingredients. Colors may, in time, fade. We have sent the forms which seem to be right for you. Slippery when wet. Parental guidance suggested. Do not bend, fold, spindle, or mutilate. We reserve the right to refuse service to anyone. Use unleaded fuel only. Not affiliated with the American Red Cross. Drop in any mailbox. Edited for television. Keep cool; process promptly. Post office will not deliver without postage. Not responsible for direct, indirect, incidental or consequential damages resulting from any defect, error or failure to perform. No part of this publication may be reproduced in any form or by any means without the prior written permission of the publisher. Some of the trademarks mentioned in this product appear for identi- fication purposes only. At participating locations only. Your mileage may vary. Substantial penalty for early withdrawal. Lost ticket pays maximum rate. Your cancelled check is your receipt. Avoid contact with skin. Be sure each item is properly endorsed. Sign here without admitting guilt. Other items sold separately. Slightly higher in California. Employees and their families are not eligible. Limited time offer, call now to insure prompt delivery. No passes accepted for this engagement. Use only in well-ventilated area. Keep away from fire or flame. Replace with same type. Approved for veterans. Booths for two or more. Some equipment shown is optional. Don't try this at home. Dispose of properly. Prerecorded for this time zone. Reproduction strictly prohibited. Do not immerse. No solicitors. No alcohol, dogs, or horses. List at least two alternate dates. Record additional transactions on back of previous stub. Price does not include taxes, title, or destination charges. This is not a competition, it is only an exhibition. No wagering. @ENDNODE @NODE distribution "AmigaTalk distribution:" @{B}DISTRIBUTION ~~~~~~~~~~~~@{UB} This software package is @{B}ShareWare@{UB}. It may be put on any media which is used for the distribution of ShareWare, like Public Domain disk collections, CDROMs or FTP servers. In order to ensure the integrity of this software package, distributors should use the complete original distribution. The author cannot be held responsible if this software has become unusable due to modifications of the distribution contents or of the distribution files themselves. There is no limit on the costs of the distribution, e.g. for the media, like floppy disks, streamer tapes or compact disks, or the process of duplicating. Such limits have been proven to be harmful to the idea of shareware, i.e., instead of reducing the price of the floppy disk below the limit, the software was simply removed from the master disk. Although the @{" Author " LINK Author} does not impose any limit on the distribution of this software, he would like to express his personal opinions on this matter: * This software package should be made available to everyone free of charge whenever it is possible (so they can send me money instead ;)). * If you have acquired this software package under normal conditions from a Public Domain dealer on a floppy disk at a price higher than US $5, then you have definitely paid too much. Please don't support this improper profit making any longer and switch to a less expensive source as soon as possible. @ENDNODE @NODE startup "Running the system:" @PREV main The AmigaTalk system is invoked by typing the command @{B}AmigaTalk@{UB} or by clicking on the AmigaTalk icon. The system is interactive - that is, the user types an expression at the keyboard and the system responds by evaluating the expression and typing the result. For example, typing the expression 3 + 4 results in the value 7 being displayed in the Status Window. Execution is terminated by selecting @{B}Quit@{UB} from the Menu. The program will open its own screen & windows. Instance variables for the command level can be created by assigning a value to a new variable name. Thereafter that variable can be used at the command level, although it is not known within the scope of any method loaded in the system. The variable @{B}last@{UB} always contains the value returned by the last expression typed. @{I}Figure 2@{UI} shows the creation of a variable. Note that the assignment arrow is formed as a two-character sequence from @{B}<@{UB} and @{B}-@{UB}: @{B}newvar <- 2 / 3@{UB} (stuff you type in) @{B}newvar@{UB} @{FG SHINE}0.666667@{FG TEXT} (result displayed in Status Window) @{B}2 raisedTo: newvar + (4 / 3)@{UB} @{FG SHINE}4@{FG TEXT} @{B}last@{UB} @{FG SHINE}4@{FG TEXT} @{I}Figure 2: Creating Variables@{UI} The default behavior is for the value of expressions, with the exception of assignments, to be typed automatically as they are evaluated. This behavior can be modified either by using the @{B}PRINTCMD (formerly -d)@{UB} flag (see @{" Appendix 2 " LINK "Appendix_2"}), or by passing a message to the pseudo-variable @{I}amigatalk@{UI} (formerly @{I}smalltalk@{UI}) (see @{" Appendix 1 " LINK "Appendix_1"}). See Also @{" System Directives " LINK "SystemDirectives"} @{" System Configuration " LINK "SystemDiagram.iff/Main"} @ENDNODE @NODE SystemDirectives "System Directives:" Class descriptions must be read in from files, they cannot be entered interactively in the GUI. Pressing the @{" Parse " LINK "parsebutton"} button will bring up a file requester so that the user can select a Class source file for inclusion into the internal Class Dictionary of AmigaTalk. You can also load a class description contained in a file named @{B}newclass.st@{UB} by typing the following system directive in the Command Line string Gadget: @{B})i newclass.st@{UB} A list of files containing class descriptions can also be given as arguments to the AmigaTalk command (CLI only!). The command @{B}AmigaTalk file1 ... filen@{UB} is equivalent to the sequence @{B})i file1 ... )i filen@{UB} being typed into the Command Line Gadget. See Also, @{" )e filename " LINK "EditorSystemDirective"} Invoke the editor. @{" )g filename " LINK "GSystemDirective"} Parse & Load a Class. @{" )i filename " LINK "IncludeSystemDirective"} Parse & Load a Class. @{" )r filename " LINK "ReadSystemDirective"} Read Commands file. @{" )l filename " LINK "LoadSystemDirective"} Load Saved Image. @{" )s filename " LINK "SaveSystemDirective"} Save System Image. @{" )! command " LINK "ShellCommandDirective"} Execute a CLI command. @ENDNODE @NODE "parsebutton" "Parse Button Behavior:" The @{B}Parse@{UB} button will ask for the file you want to parse using the ubiquitous ASL file requester. It then issues a @{" )i system directive " LINK "IncludeSystemDirective"} so that AmigaTalk will include the file class contents in memory. The file will be parsed & added to the AmigaTalk internal Class dictionary. Be sure that the file has already been debugged, since the parser has no way of returning error notices to the AmigaTalk screen. You can do this by typing a parse command into a Shell or CLI: @{FG SHINE} AmigaTalk:c/Parse [-hex] myClass.st >myClass.p @{FG TEXT} The parser will send error strings back to the Shell or CLI. @ENDNODE @NODE "EnvFormat" "Format for Env file:" $40D20001 '\n' screenModeID (default) 640,480 '\n' screen dimensions to use (Over- rides the screenModeID). 0,16,640,260 '\n' Command Window coordinates (x,y,w,h) ExpansionRoom Unused space. @ENDNODE @NODE ToolTypes "AmigaTalk icon ToolTypes:" The following ToolTypes can be specified in the AmigaTalk icon: @{U}ToolType:@{UU} @{U}Default Values:@{UU} DisplayEnvFile =AmigaTalk:AmigaTalk.env (See @{" File Format " LINK "EnvFormat"}). Editor =C:Ed DefaultEnvFile =AmigaTalk:Prelude/standard LibraryPath =AmigaTalk:CodeLib/ ParserName =AmigaTalk:c/Parse CommandPath =[AmigaTalk:c/] HelpPath =[AmigaTalk:Help/] (used by @{" DocumentViewer " LINK "ATHelper.guide/Main"}) HelpProgram =MultiView (used by @{" DocumentViewer " LINK "ATHelper.guide/Main"}) GeneralPath =[AmigaTalk:General/] IntuitionPath =[AmigaTalk:Intuition/] SystemPath =[AmigaTalk:System/] UserPath =[AmigaTalk:User/] ARexxPortName =[AmigaTalk_Rexx] DefaultTabSize =[3] @{I}(Not currently used).@{UI} StatusHistoryLength =[20] @{I}(Not currently used).@{UI} ColorsFile =[AmigaTalk:AmigaTalk.colors] LogoName =AmigaTalk.iff LogoCmd =DisplayLogo See Also, @{" TheBrowser ToolTypes " LINK TheBrowser.guide/BrowserToolTypes} @ENDNODE @NODE EditorSystemDirective "System Directive )e (Editor):" @PREV SystemDirectives Note that the )e system directive invokes an editor on a file containing class descriptions, and then automatically includes the file when the editor is exited. Classes also respond to the message @{I}edit@{UI}, which will have the same effect as the @{B})e@{UB} directive applied to the file containing the class description. Thus the typical debug/edit/debug cycle involves repeated uses of the @{B})e@{UB} directive or the @{I}edit@{UI} mes- sage until a desired outcome is achieved. The editor invoked by the @{B})e@{UB} directive can be changed by setting the @{U}EDITOR=@{UU} ToolType in the AmigaTalk icon. _____________________________________________________________ )e filename Edit the named file. The AmigaTalk system will suspend, leaving the user in an editor for making changes to the named file. Upon leaving the editor, the named file will automatically be included, as if the @{B})i@{UB} system directive had been typed. @ENDNODE @NODE GSystemDirective "System Directive )g (Read):" @PREV SystemDirectives @{B}NOTE: This system directive command is similar to @{I})r@{UI}, except that it searches @{I}AmigaTalk:CodeLib/@{UI} for the file to read in.@{UB} )g filename Search for an entry in the system library area matching the filename. If found, the class descriptions in the library entry are included. This command is useful for including commonly used classes that are not part of the standard prelude, such as classes for statistics applications or graphics. See Also @{" )r (Read) " LINK "ReadSystemDirective"} @ENDNODE @NODE IncludeSystemDirective "System Directive )i (Include class):" @PREV SystemDirectives )i filename Include the named file. The file must contain one or more class descriptions. The class descriptions are parsed, and if syntactically legal, new instances of the classes are added to the AmigaTalk system. @{FG SHINE} WARNING: No error messages from the parser will be returned to you. you must parse the class file from a Shell or CLI, in order to make sure that it's syntactically legal. @{FG TEXT} @ENDNODE @NODE LoadSystemDirective "System Directive )l (Load):" @PREV SystemDirectives WARNING: This command is @{B}NOT@{UB} currently implemented! )l filename Load a previously saved environment from the named file. The current values of all variables are overridden. The file must have been created using the @{B})s@{UB} directive. @ENDNODE @NODE ReadSystemDirective "System Directive )r (Read):" @PREV SystemDirectives @{B}NOTE: This system directive command is similar to @{I})g@{UI}, except that it does NOT search @{I}AmigaTalk:CodeLib/@{UI} for the file to read in.@{UB} )r filename Read the named file. The file must contain AmigaTalk statements, as they would be typed at the keyboard. The effect is just as if the lines of the file had been typed at the keyboard. The file @{B}cannot@{UB} contain class descriptions. NOTE: This operation can also be performed by selecting the @{B}Load@{UB} menu item from the menu. See Also @{" )g (Read) " LINK "GSystemDirective"} @ENDNODE @NODE SaveSystemDirective "System Directive )s (Save):" @PREV SystemDirectives WARNING: This command is @{B}NOT@{UB} currently implemented! )s filename Save the current state in the named file. The values of all variables are saved, and can later be reloaded using the @{B})l@{UB} directive. @ENDNODE @NODE ShellCommandDirective "System Directive )! (Shell):" @PREV SystemDirectives )!string Execute the remainder of the line following the exclamation point as an AmigaDOS command. Nothing is done with the output of the command, nor is the returning status of the command recorded. @ENDNODE @NODE SystemDifferences "System Differences:" Differences between AmigaTalk & the Smalltalk-80 system: This section describes the differences between the language accepted by the AmigaTalk system and the language described in @{B}Smalltalk blue@{UB}. The principal reasons for these changes are as follows: @{FG SHINE} size @{FG TEXT} Classes which are largely unnecessary, or which could be easily simulated by other classes (e.g. Association, SortedCollection) have been eliminated in the interest of keeping the size of the standard library as small as possible. Similarly, indexed instance variables are not supported, since to do so would increase the size of every object in the system, and they can be easily simulated in those classes in which they are important (see below). @{FG SHINE} representation @{FG TEXT} The need for a textual representation for class descriptions required some small additions to the syntax for class methods (see Appendix 3). Similarly, the fact that classes and subclasses can be separately parsed, in either order, forced some changes in the scoping rules for instance variables. The following sections describe these changes in more detail: @{FG SHINE} 3.1. Internal Representation Different @{FG TEXT} The internal representations of objects, including processes, inter- preters, and bytecodes, is entirely different in the AmigaTalk system from the Smalltalk-80 system described in @{B}SmallTalk blue@{UB}. If you read @{B}A Little Smalltalk@{UB}, AmigaTalk is pretty much the same system, except that there are more defined primitives, allowing the full use of the Amiga Operating System. @{FG SHINE} 3.2. FewerClasses @{FG TEXT} Many of the classes described in @{B}Smalltalk blue@{UB} are not included as part of the AmigaTalk basic system. Some of these are not necessary because of the interest in keeping the standard library of classes small. A complete list of included classes for the AmigaTalk system is given in @{" Appendix 1 " LINK "Appendix_1"}. @{FG SHINE} 3.3. No Class Protocol @{FG TEXT} Protocol for all classes is defined as part of class Class. It is not possible to redefine class protocol as part of a class description, only instance protocol. The notion of metaclasses is not supported. @{FG SHINE} 3.4. Cascades Different @{FG TEXT} The semantics of cascades has been simplified and generalized. The result of a cascaded expression is always the result of the expression to the left of the first semicolon, which is also the receiver for each subsequent continuation. Continuations can include multiple messages. A rather non-sensical, but illustrative, example is the following: @{B}2 + 3 ; - 7 + 3 ; * 4@{UB} The result of this expression is 5 (the value yielded by 2 + 3). 5 is also the receiver for the message - 7, and that result (-2) is in turn the receiver for the message + 3. This last result is thrown away. 5 is then again used as the receiver for the message * 4, the result of which is also thrown away. @{FG SHINE} 3.5. Instance Variable Name Scope @{FG TEXT} In the language described in @{B}Smalltalk blue@{UB}, an instance variable is known not only to the class protocol in which it is declared, but is also valid in methods defined for any subclasses of that class. In the AmigaTalk system an instance variable can be referenced only within the protocol for the class in which it is declared. @{FG SHINE} 3.6. Indexed Instance Variables @{FG TEXT} Implicitly defined indexed instance variables are not supported. In any class for which these are desired they can be easily simulated by including an additional instance variable, containing an @{"Array" LINK "ArrayClass"}, and including the following methods: Class Whatever ! indexVars ! [ @{B}new:@{UB} size indexVars <- Array new: size | @{B}at:@{UB} location ^ indexVars at: location | @{B}at:@{UB} location @{B}put:@{UB} value indexVars at: location put: value ... ] The message @{B}new:@{UB} can be used with any class, with an effect similar to @{B}new@{UB}. That is, if a new instance of the class is created by sending the message @{B}new:@{UB} to the class variable, the message is immediately passed on to the new instance, and the result returned is used as the result of the creation message. @{FG SHINE} 3.7. No Pool Variables @{FG TEXT} The concepts of pool variables, global variables, or class variables are not supported. In their place there is a new pseudo-variable, @{I}amigatalk@{UI} (formerly @{I}smalltalk@{UI}), which responds to the messages @{B}at:@{UB} and @{B}at:put:@{UB}. The keys for this collection can be arbitrary. Although this facility is available, its use is often a sign of poor program design, and should be avoided. @{FG SHINE} 3.8. No Associations @{FG TEXT} The class @{"Dictionary" LINK GeneralClasses.guide/DictionaryClass} stores keys and values separately, rather than as instances of Association. The class Association, and all messages referring to Associations have been removed. Creating an Association Class is left as an exercise for the user ;) @{FG SHINE} 3.9. Generators in place of Streams @{FG TEXT} The notion of stream has been replaced by the slightly different notion of @{I}generators@{UI}, in particular the use of the messages @{B}first@{UB} and @{B}next@{UB} in subclasses of @{"Collection" LINK GeneralClasses.guide/CollectionClass}. External files are supported by an explicit class @{"File" LINK GeneralClasses.guide/FileClass}. @{FG SHINE} 3.10. Primitives Different @{FG TEXT} Both the syntax and the use of primitives has been changed. Primitives provide an interface between the AmigaTalk world and the underlying Amiga operating system, permitting the execution of operations that can- not be specified in AmigaTalk. In AmigaTalk, primitives cannot fail and must return a value (although they may, in error situations, print an error message and return @{I}nil@{UI}). The syntax for primitives has been altered to permit the specification of primitives with an arbitrary number of arguments. The format for a primitive call is as follows: @{B}@{UB} Where "number" is the number of the primitive to be executed (which must be a value between 1 and 255, 0 does nothing), and "argumentlist" is a list of AmigaTalk primary expressions (see @{"Appendix 2" LINK "Appendix_2"}). @{"Appendix 4" LINK "Appendix_4"} lists the meanings of each of the currently recognized primitive numbers. @{FG SHINE} 3.11. Byte Arrays @{FG TEXT} A new syntax has been created for defining an array composed entirely of unsigned integers in the range 0-255. These arrays are given a very tight encoding. The syntax is a pound sign, followed by a left square brace, followed by a sequence of numbers in the range 0 to 255, followed by a right square brace. @{B}#[ numbers ]@{UB} Byte Arrays are used extensively inside the AmigaTalk system. @{FG SHINE} 3.12. New Pseudo-Variables @{FG TEXT} In addition to the pseudo-variable @{I}amigatalk@{UI} already mentioned, another pseudo-variable, @{I}selfProcess@{UI}, has been added to the AmigaTalk system. @{I}selfProcess@{UI} returns the currently executing process, which can then be passed as an argument to a @{" Semaphore " LINK "GeneralClasses.guide/SemaphoreClass"}, or be used as a receiver for a message valid for class @{"Process" LINK GeneralClasses.guide/ProcessClass}. Like @{I}self@{UI} and @{I}super@{UI}, @{I}selfProcess@{UI} can- not be used at the command level. @{FG SHINE} 3.13. No Dependency @{FG TEXT} The notion of dependency, and automatic dependency updating, is not included in AmigaTalk. I will investigate whether AmigaTalk can do this without changing the underlying interpreter. If you believe that it can be done, send @{" me " LINK "Author"} your AmigaTalk source code! @ENDNODE @NODE Appendix_1 "Appendix 1 - Class Descriptions:" The messages accepted by the classes included in the @{B}AmigaTalk@{UB} standard library are described in the following pages. A list of the classes defined, where indentation is used to imply subclassing, is given below: @{"Object" LINK "GeneralClasses.guide/ObjectClass"} @{"UndefinedObject" LINK "GeneralClasses.guide/UndefinedObjectClass"} @{"Symbol" LINK "GeneralClasses.guide/SymbolClass"} @{"Boolean" LINK "GeneralClasses.guide/BooleanClass"} @{"True" LINK "GeneralClasses.guide/TrueClass"} @{"False" LINK "GeneralClasses.guide/FalseClass"} @{"Magnitude" LINK "GeneralClasses.guide/MagnitudeClass"} @{"Char" LINK "GeneralClasses.guide/CharClass"} @{"Number" LINK "GeneralClasses.guide/NumberClass"} @{"Integer" LINK "GeneralClasses.guide/IntegerClass"} @{"Float" LINK "GeneralClasses.guide/FloatClass"} @{"Radian" LINK "GeneralClasses.guide/RadianClass"} @{"Point" LINK "GeneralClasses.guide/PointClass"} @{"Random" LINK "GeneralClasses.guide/RandomClass"} @{"Collection" LINK "GeneralClasses.guide/CollectionClass"} @{"Bag" LINK "GeneralClasses.guide/Bag_SetClass"} @{"Set" LINK "GeneralClasses.guide/Bag_SetClass"} @{"KeyedCollection" LINK "GeneralClasses.guide/KCollectionClass"} @{"Dictionary" LINK "GeneralClasses.guide/DictionaryClass"} @{"AmigaTalk" LINK "GeneralClasses.guide/AmigaTalkClass"} @{"File" LINK "GeneralClasses.guide/FileClass"} @{"SequenceableCollection" LINK "GeneralClasses.guide/SCollectionClass"} @{"Interval" LINK "GeneralClasses.guide/IntervalClass"} @{"LinkedList" LINK "GeneralClasses.guide/LinkedListClass"} @{"Semaphore" LINK "GeneralClasses.guide/SemaphoreClass"} @{"File" LINK "GeneralClasses.guide/FileClass"} @{"ArrayedCollection" LINK "GeneralClasses.guide/ACollectionClass"} @{"Array" LINK "GeneralClasses.guide/ArrayClass"} @{"ByteArray" LINK "GeneralClasses.guide/ByteArrayClass"} @{"String" LINK "GeneralClasses.guide/StringClass"} @{"Block" LINK "GeneralClasses.guide/BlockClass"} @{"Class" LINK "GeneralClasses.guide/ClassClass"} @{"Process" LINK "GeneralClasses.guide/ProcessClass"} @{"Pen" LINK "GeneralClasses.guide/PenClass"} @ENDNODE @NODE Appendix_2 "Appendix 2 - Manual page:" AmigaTalk(1) (local) AmigaTalk(1) @{FG SHINE} NAME @{FG TEXT} AmigaTalk - a derivative of @{B}Little Smalltalk@{UB} @{FG SHINE} SYNOPSIS @{FG TEXT} AmigaTalk [options] [CLASSES/K/F class_files] options are: NOSTD/S,LEXDBG/S,HELP/?/S,LOGO/S,SUMMARY/S,NOREFSUMMARY/S,NOSTATUS/S, PRINTCMD/K,DBGLEVEL/K,LOADCMDS/K,LOADLIBRARY/K,CLASSES/K/F @{FG SHINE} DESCRIPTION @{FG TEXT} @{B}AmigaTalk@{UB} is an interpreter for a Smalltalk-like language. For a complete description of the language accepted by the interpreter see the user manual. Options accepted on the command line (CLI) are as follows: SUMMARY (formerly -a) If the -a option is given statistics on the number of memory allocations will be displayed following execution. NOSTATUS (formerly -b) No Status Window (Default = ON). DBGLEVEL=0,1 (debug level control) Default behavior is @{I}DbgLevel=0@{UI}, which is no extra information is displayed. @{I}DbgLevel=1@{UI} turns on the printing of debug information. I recommend using the @{" Trace menuitem " LINK "TraceMI"} instead. PRINTCMD=0,1,2 (formerly -d digit) (print level control) If the "digit" is zero only those results explicitly requested by the user will be printed. If 1, the values of expressions typed at the keyboard will be displayed (this is the default). If 2, the values of expressions and the values assigned in assignment statements will be displayed. Examples: PrintCmd=0 (Just print requested results only) PrintCmd=1 (Default behavior). PrintCmd=2 (Display everything). LOADLIBRARY=libName (formerly -g) The next argument is taken to be the name of an additional library stored in the system library area (see @{B}LibraryPath@{UB} ToolType). The library is loaded following the standard prelude, just as if a @{B})g@{UB} directive were given at the beginning of execution (Example: LoadLibrary=Path/libName). HELP or {B}?{UB} (formerly -h or @{B}?@{UB}) Print usage information. LOGO (formerly -i) @{" Display Logo window " LINK "AmigaTalk.iff/Main"} (Default = OFF). NOSTD (formerly -n) The NOSTD option, if given, suppresses the loading of the standard library. As this gives you a system with almost no functionality, it is seldom useful except during debugging. LOADCMDS=commandFile (formerly -r) The next argument is taken to be the name of a file of Smalltalk commands. The file is included prior to execution, just as if a @{B})r@{UB} directive were given at the beginning of execution (Example: LoadCmds=Path/commandFile). NOREFSUMMARY (formerly -s) In normal operation, at the end of execution the number of reference count increments and decrements is printed just prior to exit. In the absence of cycles these two figures should be equal. Since cycles can cause large chunks of memory to become unreachable, and seriously degrade performance, this information is often useful in debugging. The NOREFSUMMARY option, if given, suppresses the printing of this information. LEXDBG (formerly -z) print lexical analyzer debugging statements to the CLI/Shell. This option will slow execution time down a lot since every lexical token will have a print statement executed for it. @{B}The following options are best left untried, since fast loading and reading & saving of binary images of the internal system state are not currently implemented:@{UB} -l The next argument is taken to be the name of a file containing a binary image saved using the )s directive (see below). This binary image is loaded prior to execution. -m Do not perform fast loading. (Used when fastloading is the default). -f The -f option indicates fast loading should be used, which loads a binary save image (see ``)s'' below) for the standard library. The class_files, if given, must contain class descriptions. Consult the reference manual for the syntax for class descriptions. The classes defined are included along with the standard library of classes before execution begins. I recommend that you use the @{FG SHINE})i filename@{FG TEXT} command in the Command Window instead. @{U}Once execution begins, the Status Window will display:@{UU} @{I}Welcome to AmigaTalk!@{UI} indicating that the system is ready for a command to be entered. A command consists of a valid Smalltalk expression, without a terminating period. As each expression is entered it is executed by the Smalltalk interpreter, and the results displayed. The following system directives can be entered in place of commands: )e filename Edit the named file, which must contain only class descriptions. The AmigaTalk system will suspend, leaving the user in an editor for making changes to the named file. Upon exiting the editor, the named file will automatically be included, as with the @{FG SHINE})i @{FG TEXT}directive (below). The editor chosen by this command is taken from the Editor ToolType in the AmigaTalk icon. )g filename Search for a file with the given name in the system library area. If found, load the library in with the users classes. This is useful for creating libraries of commonly used classes which are not part of the standard prelude, such as classes for statistics applications or for graphics. )i classFileName Include the named Source file. The file must contain one or more class descriptions. The class descriptions are parsed, and if syntactically legal, new instances of the classes are added to the AmigaTalk system. Remember that @{" Parse " LINK "ParseHelp"} errors will be reported to a window on the Workbench, so check that there were no errors reported before assuming that your new Class has been added to the @{B}AmigaTalk@{UB} program! )r commandFileName Read the named Command file. The effect is just as if the lines in the file had been typed at the keyboard. The file cannot contain class descriptions. )!string Execute the string following the exclamation point as a system command. @{B}The following options are best left untried, since reading & saving of binary images of the internal system state are not currently implemented:@{UB} )l filename Load a saved binary environment. The file must have been prev- iously created using the )s directive (below). The values of all variables are overridden. )s filename Save the current environment in the named file. The values of all variables will be saved, and can later be restored using the )l directive (above). @{FG SHINE} Author @{FG TEXT} @{" James T. Steichen " LINK "Author"}, for the Amiga-specific code & Tim Budd, Department of Computer Science, The University of Arizona, for the original Little Smalltalk programming system. @{FG SHINE} See Also @{FG TEXT} Timothy A. Budd, "A Little Smalltalk Users Manual" & "A Little Smalltalk" by Timothy A. Budd, Addison Wesley, 1987 @{FG SHINE} Bugs @{FG TEXT} Not all the Smalltalk-80 Language described in the Blue Book is supported; see the user manual for details. (Smalltalk- 80 is a trademark of Xerox Corporation). @ENDNODE @NODE Appendix_3 "Appendix 3:" NOTE: @{B} theBrowser treats ! & | differently, though they are equivalent tokens to the parser & the AmigaTalk interpreter. I recommend that you use | only for separating methods within a Class file & ! everywhere else. @{UB} The following is an example class description: Class Set :Collection ! dict ! [ new dict <- Dictionary new | add: newElement dict at: newElement ifAbsent: [dict at: newElement put: 1] | remove: oldElement ifAbsent: exceptionBlock dict removeKey: oldElement ifAbsent: exceptionBlock | size ^ dict size | occurrencesOf: anElement ^ dict at: anElement ifAbsent: [0] | first dict first. ^ dict currentKey | next dict next. ^ dict currentKey ] @ENDNODE @NODE Appendix_4 "Appendix 4 - Primitive Numbers:" The following list gives the function performed by each primitive in the @{B}AmigaTalk@{UB} system. @{FG SHINE} Information about objects: @{FG TEXT} 0 (not used ) 1 class of an object 2 superobject of an object 3 test if class responds to new 4 size of object 5 hash value 6 test if two built-in objects are of the same type 7 object equality testing ( == ) 8 various switch toggles 9 numerical generality testing @{FG SHINE} Integer Manipulation: @{FG TEXT} 10 integer addition (both args must be integer) 11 integer subtraction 12 integer < test 13 integer > test 14 integer <= test 15 integer >= test 16 integer = test 17 integer ~= test 18 integer multiplication 19 integer // @{FG SHINE} Bit Manipulation & other integer-valued functions: @{FG TEXT} 20 gcd: 21 bitAt: 22 bitOr: 23 bitAnd: 24 bitXor: 25 bitShift: 26 radix: 27 not used 28 integer quo: 29 integer rem: @{FG SHINE} Other integer functions: @{FG TEXT} 30 doPrimitive:withArguments: 31 not used 32 convert random integer to random float 33 bitInvert 34 highBit 35 randomNumber (argument is seed ) 36 asCharacter 37 asString 38 factorial 39 asFloat @{FG SHINE} Character manipulation: @{FG TEXT} 40 not used 41. not used 42 character < test 43 character > test 44 character <= test 45 character >= test 46 character = test 47 character ~= test 48 not used 49 not used @{FG SHINE} Character unary functions: @{FG TEXT} 50 digitValue 51 isVowel 52 isLetter 53 isLowerCase 54 isUpperCase 55 isSeparator 56 isAlphaNumeric 57 caseShift 58 asString 59 asciiValue @{FG SHINE} Floating point manipulation: @{FG TEXT} 60 floating point addition (both args must be float) 61 floating point subtraction 62 floating point < test 63 floating point > test 64 floating point <= test 65 floating point >= test 66 floating point = test 67 floating point ~= test 68 floating point multiplication 69 floating point division @{FG SHINE} Other floating point operations: @{FG TEXT} 70 ln 71 sqrt 72 floor 73 ceiling 74 not used 75 integerPart 76 fractionalPart 77 gamma 78 asString 79 exp @{FG SHINE} Other numerical functions: @{FG TEXT} 80 normalize number to be within 0 and 2 * pi. 81 sin 82 cos 83 not used 84 arcSin 85 arcCos 86 arcTan 87 not used 88 raisedTo: 89 radix: @{FG SHINE} Symbol Commands: @{FG TEXT} 90. not used 91 symbol comparison, returns true or false. 92 printString 93 asString 94 print (used internally) 95 not used 96 ASCIIValue - Change an integer to a string Object. Currently only used for carriage return (see @{" cr " LINK "Amigatalk:Help/GeneralClasses.guide/StringClass"}). 97 build a new class, arguments are class name, superclass name, source filename, instance variables, messages, methods, context size & maximum stack size (eight arguments!). 98 insert an object into class dictionary, first argument is symbol, second argument is class definition 99 find an object in class dictionary. argument is symbol. @{FG SHINE} String operations: @{FG TEXT} 100 string length 101 string compare, case important - return -1, 0 or 1. 102 string compare, case not important 103 string catenation 104 string at: 105 string at:put: 106 copyFrom:length: 107 copy (new string with same chars) 108 asSymbol 109 string printString @{FG SHINE} Array manipulation: @{FG TEXT} 110 build an untyped object of given size, argument is integer size. 111 index variable get (first argument is object, second is index) 112 index variable put (first argument is object, second is index, third argument is expression) 113 object grow (returns a new object with same instance variable values as first argument, but with second argument tacked on end as new instance variable) 114 build an instance of "Array" of the given size. 115 new string of given size 116 ByteArray new: 117 ByteArray size 118 ByteArray at: 119 ByteArray at:put: @{FG SHINE} Output & error messages: @{FG TEXT} 120 print string with no return 121 print string with return 122 general error - first argument is receiver, second is error string. 123 print string on error output (with return) 124 @{B}Curses@{UB} library interface primitives. See @{" Curses interface " LINK Curses.guide} for more information. 125 Perform system call (untested as of 15-May-2000). No checking is done to make sure that the system command is valid, other than verifying that the argument is a String object. 126 print a string at a specific point on the terminal. See @{" Curses interface " LINK Curses.guide} for more information. 127 block return without surrounding context 128 reference count less than zero, first argument is guilty object. 129 does not respond error, first argument is receiver, second is message. @{FG SHINE} File operations: @{FG TEXT} 130 file open, first argument is name, second argument is mode 131 file read 132 file write 133 set file mode, first argument is file, second is mode indicator (anInteger) 134 compute file size in bytes 135 file set location (at:) second argument is location (anInteger) 136 return current file offset in bytes 137 Used for generating Class Information files for theBrowser. (see AmigaTalk.st) 138 not used 139 not used @{FG SHINE} Process management: @{FG TEXT} @{B} NOTE: This is NOT the same as Exec Processes that are utilized by the Amiga OS. @{UB} 140 block execute (trapped by interpreter) 141 new process (withArguments:) 142 terminate a process 143 perform:withArguments: (trapped by interpreter) 144. not used 145 set state 146 return state 148 start atomic action 149 end atomic action @{FG SHINE} Operations on classes: @{FG TEXT} 150 class edit 151 superclass of a class 152 class name (a Symbol) 153 new instance of a class 154 list all commands class responds to 155 respondsTo: , second argument is a symbol 156 class view (drop into editor, but no include) 157 class list 158 variables (returns an array of symbols) 159 get ByteCode representation of method. @{FG SHINE} Date & Time: @{FG TEXT} 160 current date and time as string 161 seconds time counter 162 clear the screen (Curses function) @{FG SHINE} Plot(3) interface: @{FG TEXT} @{B}(Only 20 (max) Allowed at one time!)@{UB} @{B} NOTE:@{UB}@{FG SHINE} These primitives have been re-worked so that they are Amiga-specific. So DON'T expect any code you write to be portable! @{FG TEXT} 169 Open, Close or Move a PlotEnv Window. 170 clear the Plot window. 171 move the Plotting Pen. 172 draw a line from the current location to the given location. 173 draw a point at the given location. 174 draw a circle. 175 draw a box (Box( x0, y0, x1, y1 )) 176 set the drawing pens to Color registers. (pens( front, back )) 177 draw a line (line( x1, y1, x2, y2 )) 178 print a label (label( string, x, y )) 179 establish a line type (SetDrPt( bitPattern )) Primitives 180 through 255 are purposely NOT documented here, since they are used to provide the functionality of the Amiga OS to the @{B}AmigaTalk@{UB} system. You can probably figure out what they are from the Smalltalk files in the Intuiion/ & System/ directories if you are determined to pirate the knowledge; but I have a better idea for you - why not re-write & improve the Classes as I've defined them? @ENDNODE @NODE "Author" "Author Information (What a hoopy guy!):" @PREV main If your conscience is bugging you to contribute some cash for my programming efforts, please send $5 or more for the program to: The Author: James T. Steichen @{FG SHINE}(A real cool frood!)@{FG TEXT} 2217 N. Tamarack Dr. Slayton, Mn. 56172-1155 (USA) email: @{FG SHINE} jimbot@rconnect.com @{FG TEXT} (best place to send bug reports) AmigaTalk was written in C from the Original Source code for @{B}Little Smalltalk@{UB} V1.0 using the SAS C compiler V6.58. @{" TheBrowser " LINK "TheBrowser.guide/Main"} was written using @{B}CanDo!@{UB} V3.008 by InovaTronics. @ENDNODE