spd - File menu¶
File menu
New¶
Create a new source file.
The contents of the file default.r are loaded to form the bare bones of the new program. The standard default.r supplied with Sculptor contains code to create the task window wintask, and functions that enable the user to close it, either by clicking on the close button or by pressing the ESC key. It can be compiled and run. The file default.r can be edited, and code added or removed, though it should always contain the standard include file $SCULPTOR/include/sculptor.h.
See External configuration for further details.
Load program¶
Accelerator key: CTRL-L |
Load a new source file for editing.
A standard Open File dialog is opened to enable the user to select a file. If a Browse directory has been specified in the Project Settings, the dialog opens in that directory.
The selected file is loaded, along with any !include files and data dictionary files associated with ![o]file declarations in the program. If the program contains more than one window, the Choose windows screen opens for the selection of windows to be displayed. This selection can be changed at any time - see the Select->Displayed Windows option.
A file loaded into the program designer must be the source code of a Sculptor program. Source files have either a .r or a .f extension. A .f file cannot include report logic; a .r file can contain any Sculptor code. Source files are standard text files, which may have been created by the program designer itself, by an ordinary text editor, or by a combination of both. A source file may include a number of other source modules, which are incorporated by use of the Sculptor !include declaration. The program designer can process one main source file at a time, but provides for the processing of up to 254 included files.
A source file loaded into the designer should compile without error. A program is compiled either with the compiler scc, or by the Compile program menu option. If the program cannot be compiled, the errors in it may cause significant parts of the source code to be ignored. When the editing session is saved, any such portions of the source code are removed from the original source file.
The source file is checked for errors as it is loaded. If errors are found, a file called warnings.out, containing a detailed listing of the errors, is created in the current directory. The errors are also displayed in the Edit window.
If a Working directory is specified in the Project Settings, the program is loaded from this directory, using a relative pathname if necessary. Otherwise the program is loaded from the directory that contains it.
The Recent Files menu option is a quick and convenient way to load a recently opened file in the current project.
NOTES
Files using either UNIX or Windows/DOS end of line sequences are acceptable to the program designer. However, if the file is modified then the newly-written file will be in Windows/DOS format.
Reload program¶
Reload the program. This is particularly useful if include files have been added, since the option causes the files to be loaded.
Save program¶
Accelerator key: CTRL-S |
Save the current file or files.
This command causes the main source file and any associated !include files to be automatically saved under their original names. Read-only include files are not saved.
If the Backup Changed Files option (Options menu) is ticked, the existing files are saved and renamed with a .bak extension. Note that the .bak files only save the file in the state it was immediately before the previous save. A second save will therefore cause a file in its original form to be lost.
If the current file has been newly created and has not yet been allocated a name, the Save program as option is called automatically.
NOTES
Data dictionary (.d) files are read-only and cannot be edited using the program designer. The ddeditor program is used to create and amend data dictionary files.
See Restrictions for certain limitations which are placed on saving source files.
Save program as¶
Save a new file, or save an existing file under a new name. A standard Save File dialog opens for the selection of the new file’s path and name. The file must have the extension .r if the program contains report logic; otherwise the .f extension can be used. There is, however, no advantage to the use of .f and it is not recommended. If a Browse directory has been specified in the Project Settings, the dialog opens in that directory.
New project¶
Create a new project with the same settings as the default project. A dialog opens for the selection of the project’s name and parent directory. By default, the parent directory is $SCULPTOR/default/logname/projects, though another directory can be chosen a browse button is provided). A directory is created in the parent directory with the same name as the project, and a settings file for the project created in the project directory.
If no default project exists, built-in defaults are used.
See Projects.
Load project¶
Load an existing project. A Browse for Folder dialog opens, with the $SCULPTOR/default/logname/projects directory initially selected. Click on the directory bearing the same name as the project to be opened, then press OK. The project is loaded.
If the project has a different parent directory, navigate to that directory and then select the project.
The Recent Projects option is the most convenient way to open a recently opened project.
Save project as¶
Create a new project with the same settings as the currently selected project. In all other respects this option is identical to the New Project option described above.
Delete project¶
Delete a project. A Browse for Folder dialog opens, with the $SCULPTOR/default/logname/projects directory initially selected. Click on the directory bearing the same name as the project to be deleted, then press OK. The project is deleted.
The currently selected project cannot be deleted.
Compile program¶
Accelerator key: ALT-C |
Save the current file or files, and compile the program using the Sculptor source code compiler scc. No backup copies are made. If the program fails to compile, the compilation error messages are displayed.
The following Project Settings are relevant to this option:
Compile script |
The program is compiled using this script. |
Binary directory |
If specified, the compiled program is moved to this directory. |
Working directory |
If specified, the program is compiled from this directory, using a relative pathname if necessary. Otherwise the program is compiled from the directory that contains it. |
Debug |
If this box is checked, the program is compiled with debug information, and may be run by the Sculptor debug program scdebug. |
Execute program¶
Accelerator key: ALT-X |
Execute the compiled program.
The following Project Settings are relevant to this option:
Execute script |
The program is executed using this script. |
Execute directory |
If specified, the compiled program is executed from this directory, using an absolute pathname if necessary. If no execute directory is specified, the program is executed in the directory where it resides. |
Debug |
If this box is checked, the Sculptor program debug utility scdebug is called to execute the program. |
See Running a Sculptor screen form program and Running a Sculptor report program for information on the run time interpreters (sagewc and srepwc) that are used to execute a program.
Recent Files¶
Opens a list of the most recent files opened in the current project. Whenever a program is loaded, Sculptor adds it to the Recent files list for the currently loaded project, Click on a file to open it.
Recent Projects¶
Opens a list of recently opened projects. Click on a project to select it.
Exit¶
Accelerator key: CTRL-Q |
End the current session and exit from the program. A warning is issued if there are unsaved changes.
RELATED TOPICS |