|
Contents | Previous | Next | Subchapters |
| Syntax |
chfile(caption, default, description, extension) |
| See Also | openfile , savefile |
The character row vector caption
specifies the caption for the dialog.
The caption must begin with one of the following words:
"Read",
"Load",
"Open",
"Write",
"Store", or
"Save".
The character row vector default
specifies the default file name.
This name may contain the entire path that specifies the file from
the root directory, or it may specify the file relative
to the current directory.
If the second character of default
is a colon, the first character in
default specifies a disk drive.
No other character in default can be a colon.
The character row vector description
describes the type of files that the
argument extension refers to
(for example description might equal "data files").
The character row vector extension
specifies a file extension (for example "*.dat").
The list of files displayed in the dialog is
limited to those with this extension.
The return value of chfile is a character row vector
containing the name of the file that the user chooses.
This is a complete path name including the disk drive.
If the user chooses the Cancel button in the dialog,
an empty character row vector is returned;
i.e., its column dimension is zero.
caption = "Load Program"
default = "\omwin\autoexec.oms"
description = "O-Matrix Source"
extension = "*.oms"
chfile(caption, default, description, extension)
O-Matrix will display a browser dialog that lists the files
in the \omwin directory that have the
mat extension. If you choose a file, its name will
be printed in the command window.
* followed by the character .
and it must contain at least one more character.
You can specify all files by using the extension *.*.