Next Previous Contents

12. Miscellaneous Functions

12.1 print

Synopsis

Display a string representation of an object or value

Usage

print (value [,&var|file-pointer|filename])

Description

The print function displays the string representation of a value to the display. An optional second argument may be provided to specify where to write the resulting string: a variable, an open file pointer, or to a file.

If the string representation of the object appears to contain more lines than are available on the screen, then the output will be piped to the program given by the PAGER environment variable. Alternatively the pager program may be specified via the pager qualifier.

Qualifiers

   pager[=string]       Force the use of the pager.  If a value is
                         specified, then use it for the pager command.
   nopager              Do not use a pager.

Example

Print the string representation of an array to a file called array.dat:

   print ([1:20:0.1], "array.dat");

Print the string represent of an array to a string str:

   print ([1:20:0.1], &str);

See Also

print_set_pager, print_set_pager_lines

12.2 print_set_pager

Synopsis

Set the name of the pager program used by the print program

Usage

print_set_pager (String_Type cmd)

Description

This function may be used to specify the name of the default pager to be used by the print function.

See Also

print, print_set_pager_lines

12.3 print_set_pager_lines

Synopsis

Set the maximum number of lines to print before using a pager

Usage

print_set_pager_lines (Int_Type num)

Description

The print_set_pager_lines function sets the maximum number of lines that the string representation of an object can be before the print function will use a pager.

See Also

print, print_set_pager


Next Previous Contents