| LOAD | |
| Syntax | LOAD filename LOAD filename.ext |
| Explanation | LOAD transfers the contents of the file
specified by its input from the disk to the workspace.
The entire file is treated as though it were typed from
the keyboard. LOAD throws an error if the file is not
successfully loaded. LOAD can load binary workspaces as
well as ASCII files containing Logo commands. If you want
LOAD to display the name of Logo procedures as they are
defined, set the VERBOSE property of the built-in PREFS object to TRUE. Note that the file still exists on the disk; only a copy of it has been transferred to the workspace. If no file name extension is specified, LOAD loads the file filename.LGO. To load a file that has no extension, a period is necessary after the filename. Binary workspaces have the extension .BIN. LOAD is also capable of displaying a standard file open/save dialog box. In order to open a dialog box instead of a file, the file name contains a list of file type descriptors. A file type descriptor is a file type, optionally followed by an "=" and a description. The text "lgo=Logo source file" would be a vaild file type descriptor for all files ending with ".LGO". More than one file descriptor may be supplied; in this case, separate the descriptors with commas. The file open/save dialog would display all files ending with the given file type. A Windows dialog would also display the description of the file types, while a Macintosh dialog would display the matching files only. The Logo command LOAD 'lgo=Logo source file,txt=Text file' would, for example, display all files ending with .LGO or .TXT. If you use "*" as a file type, the file open/save dialog displays all available files. This is done differently on Windows and Macintosh. A Windows dialog would initially display all files with the first type, and offer all additional file types as choices. The Macintosh dialog would always display all files matching all file types. If you use the empty word or the empty list as a file name, Logo automatically opens a file open/save dialog displaying all available files. Clicking the Cancel button in a file open/save dialog cancels the execution of the LOAD command. |
| Examples | LOAD "SHAPES |