~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/fileio/sprintf.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH printf 1 "May 1994" "Scilab Group" "Scilab Function"
 
2
.so ../sci.an
 
3
.SH NAME
 
4
sprintf - Emulator of C language sprintf function
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
7
str=sprintf(format,value_1,..,value_n)
 
8
.fi
 
9
.SH PARAMETERS
 
10
.TP 10
 
11
format
 
12
: a Scilab string. Specifies a character string combining literal characters with conversion
 
13
specifications.
 
14
.TP
 
15
value_i
 
16
: Specifies the data to be converted according to the format parameter.
 
17
.TP
 
18
str
 
19
: column vector of character strings
 
20
 
 
21
.SH DESCRIPTION
 
22
The \fVsprintf\fR function converts, formats, and stores its
 
23
\fVvalue\fR parameters, under control of the \fVformat\fR parameter.
 
24
.PP
 
25
The \fVformat\fR parameter is a character string that contains two
 
26
types of objects:
 
27
.TP 10
 
28
Literal characters
 
29
: which are copied to the output stream.
 
30
.TP
 
31
Conversion specifications
 
32
: each of which causes zero or more items
 
33
to be fetched from the \fVvalue\fR parameter list. see
 
34
\fVprintf_conversion\fR for details
 
35
.PP
 
36
 
 
37
If there are not enough items for \fVformat\fR in the
 
38
\fVvalue\fR parameter list, \fVsprintf\fR generate an error.
 
39
If any \fVvalue\fRs remain after the entire \fVformat\fR has been
 
40
processed, they are ignored.
 
41
.LP
 
42
Note: \fVsprintf\fR is obsolete, use \fVmsprintf\fR instead.
 
43
.SH EXAMPLES
 
44
.nf
 
45
fahr=120
 
46
sprintf('%3d Fahrenheit = %6.1f Celsius',fahr,(5/9)*(fahr-32)) 
 
47
 
 
48
.fi
 
49
.SH SEE ALSO
 
50
string, print, write, format, disp, file, printf, fprintf, msprintf
 
51
 
 
52
 
 
53