"Pocket Forth manual.V0.6.5" - читать интересную книгу автора (Heilman C.)printed and interpreted just as if it had been typed in. The 'ok' prompt
returns when the paste is complete. Files are also interpreted directly. The basic file loading word is "-->" (pronounced "load"). Follow "-->" with the name of the file. If the file is in a folder, a path name must be used in the following manner: --> diskName:folderName:fileName This will load the file called 'fileName' in the folder 'folderName' from the disk 'diskName'. If the file to be loaded is in the default folder or on the top level of the startup disk, then only the file name is necessary. Launch a Pocket Forth from a folder to make it the default folder. File, folder and disk names that are to be used with "-->" must not contain any spaces because the text interpreter stops at spaces, causing the entire name not to be found. This or other disk errors print an error message and return control to the keyboard. See the error section for more information. The word "open" presents a standard file open dialog to peruse. Use it to select a file to interpret. There are no restrictions on the filename or location when "open" is used. The File menu has the Open╔ command available on it, which calls "open". If System 7 is being used, files can be loaded by dragging the file icon to becomes selected. This causes Pocket Forth to start up if it is not already running and the file to be loaded. Files should be saved from the editor prior to pasting or loading into Pocket Forth. Text files require a carriage return (ASCII: $0D) at the end of each line. Lines longer than 80 characters choke the interpreter. A file stack is maintained so that files can load other files. Files can 'nest' up to five levels deep. When a file is finished interpreting, the input stream returns to the previous file and begins with the line after the "-->" was encountered. When all levels have been completed, control returns to the keyboard. If more than 5 files are nested, an error will result. The text of the current file and all pending files is kept in memory. While files can be any size, the memory available will limit how large a file will load. Use short files that deal with single aspects of a program. Reusable code in small files can be loaded by other files. Simplify source code by loading a list of modular files and code that is specific to a particular program. Comments document a program within the source code. Create comments by enclosing text within parenthesis or preceding the comment with a back╤slash. Two main types of comments are stack comments and general comments, however their different structure is by convention only. |
|
|