1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
6
<TYPE>Scilab Function</TYPE>
8
<SHORT_DESCRIPTION name="fprintf"> Emulator of C language fprintf function</SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM>fprintf(file,format,value_1,..,value_n) </CALLING_SEQUENCE_ITEM>
15
<PARAM_NAME>format</PARAM_NAME>
17
<SP>: a Scilab string. Specifies a character string combining literal characters with conversion specifications.</SP>
21
<PARAM_NAME>value_i</PARAM_NAME>
23
<SP>: Specifies the data to be converted according to the format parameter.</SP>
27
<PARAM_NAME>str</PARAM_NAME>
29
<SP>: column vector of character strings</SP>
33
<PARAM_NAME>file</PARAM_NAME>
35
<SP>: a Scilab string specifying a file name or a logical unit number (see <VERB>file</VERB>)</SP>
42
The <VERB>fprintf</VERB> function converts, formats, and writes
43
its <VERB>value</VERB> parameters, under control of the <VERB>format</VERB>
44
parameter, to the file specified by its <VERB>file</VERB> parameter.
47
The <VERB>format</VERB> parameter is a character string that contains two
51
<DESCRIPTION_ITEM label="Literal characters">
52
<SP>: which are copied to the output stream.</SP>
54
<DESCRIPTION_ITEM label="Conversion specifications">
55
<SP>: each of which causes zero or more items to be fetched from the <VERB>value</VERB> parameter list. see <VERB>printf_conversion</VERB> for details</SP>
59
If any <VERB>value</VERB>s remain after the entire <VERB>format</VERB> has been
60
processed, they are ignored.</P>
64
u=file('open','results','unknown') //open the result file
67
fprintf(u,'time = %6.3f value = %6.3f',tk,sin(tk)) // write a line
69
file('close',u) //close the result file