Contents Previous Next Subchapters

Saving A File Using The System Browser Dialog
Syntax savefile
savefile(
caption)
savefile(
captionname)
savefile(
captionnamedescriptionextension)
See Also openfile

Description
Creates a system file browser dialog, in which the user can select a file to save, and returns a character row vector containing the file name selected by the user. If specified, the following character row vectors affect the state of the file browser: caption is the caption to be used for the file browser; name is the default file name; description and extension are the default description and file extension in the dialog. The default file extension must be between 3 and 5 characters and must begin with the characters "*.". Trailing space characters are ignored in all the arguments to savefile.

If the user chooses a valid file name, the return value of savefile is a character row vector containing the name of the file. Otherwise, the return value is an empty character row vector; that is, it has column dimension equal to 0.

Example
If you enter
     caption     = "Example: savefile"
     name        = "autoexec.oms"
     description = "O-Matrix Files"
     extension   = "*.oms"
     savefile(caption, name, description, extension)
O-Matrix will display a system browser dialog. If you choose a file in the dialog, O-Matrix will print the name of the file in the command window.