1
mscanf Scilab Group Scilab Function mscanf
3
mfscanf - scan data from file mscanf - scan data from input msscanf
4
- scan data from string
7
[n,a1,...,am]=mfscanf(fd,format);
8
data=mfscanf(fd,format);
10
[n,a1,...,am]=mscanf(format);
13
[n,a1,...,am]=msscanf(str,format);
14
data=msscanf(str,format);
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
20
format : a character string, a C like format.
22
str : a character string, string to be scanned.
24
n : a scalar integer, the number or data really read.
26
a1,...,am : Output variables. if m>n the n+1:n last ai' are set to [].
28
data : a list formed by the data really read.
31
The mscanf(), mfscanf(), and msscanf() functions are interface for
32
C-coded version of fscanf, sscanf and scanf functions.
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.
39
These functions read their input from the following sources:
41
mscanf() : Reads from the Scilab input.
43
mfscanf() : Reads from the file given by the file descriptor fd.
45
msscanf() : Reads from the character string specified by the str
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')
53
fd=mopen(SCI+'/scilab.star','r')
54
mfscanf(fd,'%s %s %s')
58
mclose, meof, mfprintf, fprintfMat, mfscanf, fscanfMat, mget, mgetstr,
59
mopen, mprintf, mput, mputstr, mscanf, mseek, mtell