fname

Get a file's name

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

fname(n)

Description

fname(n) returns the name of the file specified by the file descriptor n.

The file must have been opened with fopen. The call to fopen yields the file descriptor n representing the file.

The special file descriptor 0 represents no file but output to the user interface instead; fname(0) returns NIL.

Examples

Example 1

We open a temporary file for writing. This yields the file descriptor n:

n := fopen(TempFile);

We get the file's name. Note that the name depends on the operating system:

fname(n);

Parameters

n

A file descriptor returned by fopen: a positive integer

Return Values

the name of the file: a character string of type DOM_STRING, or NIL.

See Also

MuPAD Functions

Was this topic helpful?