File: sprintf.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (42 lines) | stat: -rw-r--r-- 1,489 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
printf            Scilab Group            Scilab Function            printf
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 
            
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: sprintf is obsolete, use msprintf instead.
            
EXAMPLES
 fahr=120
 sprintf('%3d Fahrenheit = %6.1f Celsius',fahr,(5/9)*(fahr-32)) 
 
SEE ALSO
   string, print, write, format, disp, file, printf, fprintf, msprintf