| SAVE | |
| Syntax | SAVE filename (SAVE filename "TRUE) (SAVE) SAVE type-descriptors (SAVE [] "TRUE) |
| Explanation | SAVE saves the contents of the workspace
to a file on the disk. This includes all defined
procedures and names. Workspace files are saved as text
files unless otherwise specified. If no file name extension is specified, SAVE saves the file with the name filename.LGO. To save a file that has no extension, a period is necessary after the filename. If TRUE is given as a second input, SAVE saves the workspace as a binary file. This file cannot be read by humans. SAVE 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 SAVE "|LGO=Logo source files,bin=Binary workspaces| would, for example, display all files ending with .LGO or .BIN. If you use "*" as a file type, the file open/save dialog displays all available files. This is done differently on Windows and the 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, or if you omit the file name, Logo automatically opens a file open/save dialog displaying all LGO and BIN files. Clicking the Cancel button in a file open/save dialog cancels the execution of the SAVE command.. |
| Examples | SAVE "SHAPES |