~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/fileio/mscanf.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
mscanf            Scilab Group            Scilab Function            mscanf
2
 
NAME
3
 
    mfscanf - scan data from  file   mscanf - scan data from input   msscanf
4
 
  - scan data from string
5
 
  
6
 
CALLING SEQUENCE
7
 
 [n,a1,...,am]=mfscanf(fd,format);
8
 
 data=mfscanf(fd,format);
9
 
 
10
 
 [n,a1,...,am]=mscanf(format);
11
 
 data=mscanf(format);
12
 
 
13
 
 [n,a1,...,am]=msscanf(str,format);
14
 
 data=msscanf(str,format);
15
 
PARAMETERS
16
 
 fd : scalar, file descriptor given by mopen (it's a positive
17
 
             integer). The value -1 refers to the default file ( i.e the last opened
18
 
            file).
19
 
            
20
 
 format     : a character string, a C like format.
21
 
            
22
 
 str        : a character string, string to be scanned.
23
 
            
24
 
 n          : a scalar integer, the number or data really read.
25
 
            
26
 
 a1,...,am  : Output variables. if m>n the n+1:n last ai' are set to [].
27
 
            
28
 
 data       : a list formed by the data really read.
29
 
            
30
 
DESCRIPTION
31
 
   The mscanf(), mfscanf(), and msscanf() functions are interface for
32
 
  C-coded version of fscanf, sscanf and scanf functions.
33
 
  
34
 
   The mscanf(), mfscanf(), and msscanf() functions read character data,
35
 
  interpret it according to a format (see cformat), and store the converted
36
 
  results into variables. The format parameter contains conversion
37
 
  specifications used to interpret the input.
38
 
  
39
 
   These functions read their input from the following sources:
40
 
  
41
 
 mscanf()   :  Reads from the Scilab input.
42
 
            
43
 
 mfscanf()  : Reads from the file given by the file descriptor fd.
44
 
            
45
 
 msscanf()  : Reads from the character string specified by the str
46
 
            parameter.
47
 
            
48
 
EXAMPLE
49
 
 [n,a1,a2]=msscanf('123 456','%i %s')
50
 
 [n,a1,a2,a3]=msscanf('123 456','%i %s')
51
 
 data=msscanf('123 456','%i %s')
52
 
 
53
 
 fd=mopen(SCI+'/scilab.star','r')
54
 
 mfscanf(fd,'%s %s %s')
55
 
 mclose(fd)
56
 
 
57
 
SEE ALSO
58
 
   mclose, meof, mfprintf, fprintfMat, mfscanf, fscanfMat, mget, mgetstr,
59
 
  mopen, mprintf, mput, mputstr, mscanf, mseek, mtell  
60