Since Logo can save and load information from computer disk files, the work you do with Logo can be saved on disk for resumption at a later time or display at another place. Logo files can be saved on your computer's hard disk or on floppy disks. Information stored in disk files is permanently recorded. Logo workspace exists only in the computer's memory and is erased when you exit Logo or turn the computer off. Information in disk files is not affected by what program is run or by turning off the computer's power.
Loading and Saving Files
The contents of the active Logo window can be saved by clicking the Save button or by choosing the Save command from the File Menu. Each of these methods provides a dialog box through which you can indicate the name you want for the file and where it is to be saved.
Similarly, disk files can be loaded into Logo by clicking the Load button or by choosing the Load command from the File Menu. Each of these methods provides a dialog box through which you can indicate which file you want to load. If the Listener or an edit window is active the dialog box offers text files to be loaded. If the Graphics Window is active, the dialog box offers graphics files to be loaded.
In addition, the File/Open command allows you to open a file to be viewed in a Logo editor without loading it into Logo workspace. When you choose File/Open, Logo creates an editor and then inserts the contents of the specified file in it. You can view the contents of the file, change it and/or load it into Logo as you wish.
You can choose the names you want for your Logo text and graphics files within the constraints of the Windows file naming system. This means they can have a maximum of eight alphanumeric characters, followed by a period, and three more alphanumeric characters.
The three characters following the period in a file name are know as the extension. If you do not specify an extension, Logo adds file extensions for your Logo files to help organize them by type. The .LGO extension is added to the text files which are those saved from an editor or from the Listener. The .PCX extension is added to graphics files. This makes it easy to identify what type of file it is and that it was created by Logo.
Computer disks files are organized in a specified way. This method of organization is called the format of the file. Different computer programs require that the files they save and load be formatted or organized in a certain way.
Logo saves text information in a standard format called ASCII (American Standard Code for Information Interchange). When you use SAVE to save the contents of Logo workspace, save the contents of the edit buffer, or save information from Logo Help, the data is stored in an ASCII format file. Many programs, including almost all word processors, can read ASCII files meaning you can load your Logo information into other programs if you want. Conversely, information created in other programs and stored as ASCII files can be loaded into Logo.
Logo saves graphics information in PCX, BMP (Windows bitmaps), or WMF (Windows Placeable Metafiles) file formats. When you use SAVEPIC to save your Logo graphics, the picture is stored in PCX format. PCX is the default format, but one of the others can be selected via the same file dialog box. Logo graphics files conform to the format of the standard selected, so can be loaded into other programs that work with the selected format. Logo can alo loads files in these formats that were created with another program.
When Logo loads, the disk and directory from which it loads becomes the default disk. This is the location where Logo files are saved unless you specify a different location in the file name or via the dialog box. The Logo primitive DISK outputs the current default drive and SETDISK changes it.
A file location can be given as part of the file name when using LOAD or SAVE in Logo. The Logo conventions for specifying file location are the same as Windows. Certain characters have special meaning in Logo and must be preceded with the backslash character to operate properly.
|SAVE "MYFILE||MYFILE.LGO||default drive|
|SAVEPIC "MYPIC||MYPIC.PCX||default drive|
|SAVE "TEXTFILE.TXT||TEXTFILE.TXT||default drive|
|LOGODATA||DATA directory on drive C:|
Additional File Commands
Additional Logo commands that help you manage disks and files include: