Navigation Banner
 

fprintf Batch language command
  Output command. Can be used to print essentially any object to a file or to stdout (console).
Syntax  frpintf(filename or stdout or MESSAGE_LOG, list of variables, expressions or string literals);
Notes The first parameter is either a filename, given as a quote-enclosed relative path to the file containing 'fprintf' or stdout (console) w/o the quotes.; also MESSAGE_LOG can be specified as the first argument to direct output to 'messages.log' file. Printing to a file will append rather than rewrite. The variable length list of parameters that follows can contain object identifiers, expressions and quote-enclosed literals. String literals may contain C-style '\code' control sequences, most notably: '\n' for new line and '\t' for tab.

Some objects only print to files due to large sizes. 'filename' could be a string variable.

Examples
x = 12;
fprintf (stdout, x, " squared is ", x^2);
// output:
12 squared is 144

m = {{1,0}{0,1}};
fprintf (stdout, m);
// output
{
{ 1, 0}
{ 0, 1}
}

 Last modified: 8/20/2002

 
Sergei L. Kosakovsky Pond and Spencer V. Muse, 1997-2002