Writing a Line to a File

The Insert | File I/O Command | Writing Commands | Write Line menu option inserts a command into the Edit window that causes a line of text to be output to a disk file upon execution. Use expression syntax to output variables and measurement routine information to file. A carriage return is automatically appended to the text written out.

The syntax of this command in the Edit window is:

File/WriteLine,<fptrname>,<expr>

Descriptions for some of the components of this command are:

<fptrname>
This is the name of the file reference specified when the file was opened.

<expr>
This is the text to be written to file. Expressions can be used in this field.

To access the dialog box associated with this File I / O command:

  1. Open the Edit window.

  2. Place your cursor on the Write Line command.

  3. Press F9.

More:

Sample Code for Write Line