File: mscanf.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 (60 lines) | stat: -rw-r--r-- 1,987 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
mscanf            Scilab Group            Scilab Function            mscanf
NAME
    mfscanf - scan data from  file   mscanf - scan data from input   msscanf
  - scan data from string
  
CALLING SEQUENCE
 [n,a1,...,am]=mfscanf(fd,format);
 data=mfscanf(fd,format);
 
 [n,a1,...,am]=mscanf(format);
 data=mscanf(format);
 
 [n,a1,...,am]=msscanf(str,format);
 data=msscanf(str,format);
PARAMETERS
 fd : scalar, file descriptor given by mopen (it's a positive
             integer). The value -1 refers to the default file ( i.e the last opened
            file).
            
 format     : a character string, a C like format.
            
 str        : a character string, string to be scanned.
            
 n          : a scalar integer, the number or data really read.
            
 a1,...,am  : Output variables. if m>n the n+1:n last ai' are set to [].
            
 data       : a list formed by the data really read.
            
DESCRIPTION
   The mscanf(), mfscanf(), and msscanf() functions are interface for
  C-coded version of fscanf, sscanf and scanf functions.
  
   The mscanf(), mfscanf(), and msscanf() functions read character data,
  interpret it according to a format (see cformat), and store the converted
  results into variables. The format parameter contains conversion
  specifications used to interpret the input.
  
   These functions read their input from the following sources:
  
 mscanf()   :  Reads from the Scilab input.
            
 mfscanf()  : Reads from the file given by the file descriptor fd.
            
 msscanf()  : Reads from the character string specified by the str
            parameter.
            
EXAMPLE
 [n,a1,a2]=msscanf('123 456','%i %s')
 [n,a1,a2,a3]=msscanf('123 456','%i %s')
 data=msscanf('123 456','%i %s')
 
 fd=mopen(SCI+'/scilab.star','r')
 mfscanf(fd,'%s %s %s')
 mclose(fd)
 
SEE ALSO
   mclose, meof, mfprintf, fprintfMat, mfscanf, fscanfMat, mget, mgetstr,
  mopen, mprintf, mput, mputstr, mscanf, mseek, mtell