File: sprintf.cat

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (46 lines) | stat: -rw-r--r-- 1,546 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

printf(1)                      Scilab Function                      printf(1)
NAME
  sprintf - Emulator of C language sprintf function

CALLING SEQUENCE
  str=sprintf(format,value_1,..,value_n)

PARAMETERS

  format    : a Scilab string. Specifies a character string combining literal
            characters with conversion specifications.

  value_i   : Specifies the data to be converted according to the format
            parameter.

  str       : column vector of character strings

  file      : a Scilab string specifying a file name or a logical unit number
            (see file)

DESCRIPTION
  The sprintf function converts, formats, and stores its value parameters,
  under control of the format parameter.

  The format parameter is a character string that contains two types of
  objects:

  Literal characters
            : which are copied to the output stream.

  Conversion specifications
            : each of which causes zero or more items to be fetched from the
            value parameter list. see printf_conversion for details

  If there are not enough items for format in the value parameter list,
  sprintf generate an error.  If any values remain after the entire format
  has been processed, they are ignored.
  Note that sprintf is a scilab emulation of C language function build in
  Scilab. Consequently it is quite slow. Use string whenever it is possible.

EXAMPLES
  fahr=120
  sprintf('%3d Fahrenheit = %6.1f Celsius',fahr,(5/9)*(fahr-32))
SEE ALSO
  string, print, write, format, disp, file, printf, fprintf