Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspFileSetName

DspFileSetName

Sets the name of the file to display in the display "window". You should call the DspFile() function first (as the entry function for a graphics page) to define the attributes of the display. You can then use the DspFileSetName() function (as a keyboard command) to display a user-specified file. When you call this function, the specified file name is read from disk and displayed on the screen.

Syntax

DspFileSetName(AN, sName)

AN:

The animation-point number.

sName:

The name of the file to display.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

DspFile, DspFileGetInfo, DspFileGetName, DspFileScroll

Example

Pages

Page Name

FilePage

Entry Command

DspFile(20,0,20,80)

Comment

Defines a file to screen display to commence at AN20

Page Keyboard

Key Sequence

######## Enter

Command

DspFileSetName(20, Arg1)

Comment

Displays a specified file on the page

DspFile(20,0,20,80);
/* Defines the file-to-screen display to commence at AN20 using the default font, with a window size of 20 lines x 80 columns. */
DspFileSetName(20,"C:\AUTOEXEC.BAT");
! Displays file C:\AUTOEXEC.BAT.

See Also

Display Functions