Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

fprint <int> <int | float | string | vector>

fprint is undoable, queryable, and editable.

This command is functionally equivalent to the print function. The difference being the mandatory file identifier argument.

Return value

None

In query mode, return type is based on queried flag.

Related

fclose, feof, fflush, fgetline, fgetword, fopen, fread, frewind, fwrite, pclose, popen, print

MEL examples

// Print a string into a file
//
$exampleFileName = ( `internalVar -userTmpDir` + "example.tmp" );
$fileId=`fopen $exampleFileName "w"`;
fprint $fileId "Hello there\n";
fclose $fileId;