'frpintf' allows no FID

Ben Abbott bpabbott at mac.com
Tue Jan 27 20:17:27 CST 2009


On Jan 27, 2009, at 9:00 PM, Muthiah Annamalai wrote:

>
>> Subject: 'frpintf' allows no FID
>> To: bug at octave.org
>> Message-ID: <724651.67631.qm at web35201.mail.mud.yahoo.com>
>> Content-Type: text/plain; charset=us-ascii
>>
>>
> <SNIP>
>> octave:1> help fprintf
>> -- Built-in Function:  fprintf (FID, TEMPLATE, ...)
>>     This function is just like `printf', except that the output is
>>     written to the stream FID instead of `stdout'.
>>
>>     See also: printf, sprintf, fread, fscanf, fopen, fclose.
>>
>> fprintf is a built-in function
>>
>> Additional help for built-in functions and operators is
>> available in the on-line version of the manual.  Use the command
>> `doc <topic>' to search the manual index.
>>
>> Help and information about Octave is also available on the WWW
>> at http://www.octave.org and via the help at octave.org
>> mailing list.
>> octave:2> fprintf("Why ?\n");
>> Why ?
>> octave:3>
>> "
>>
>> I expect 'fprintf' to fail since no FID is specified.
>> Or the documentation to say otherwise.
>>
>> Thanks,
>>  Sergei.
>>
>
> I think the Matlab also supports similar behavior. Maybe we just  
> need a
> document
> this in Octave, in this file (src/file-io.cc). If this is acceptable I
> can generate a patch.
>
> See:
> http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/fprintf.html
>
> Thanks,
> -Muthu


Please do.

Ben



More information about the Bug-octave mailing list