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

« back to all changes in this revision

Viewing changes to man/fr/fileio/mput.xml

  • 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
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
 
3
<MAN>
 
4
  <LANGUAGE>eng</LANGUAGE>
 
5
  <TITLE>mput</TITLE>
 
6
  <TYPE>Scilab Function</TYPE>
 
7
  <DATE>April 1993</DATE>
 
8
  <SHORT_DESCRIPTION name="mput"> writes  byte or word in a given binary format</SHORT_DESCRIPTION>
 
9
  <CALLING_SEQUENCE>
 
10
    <CALLING_SEQUENCE_ITEM>mput(x [,type,fd])   </CALLING_SEQUENCE_ITEM>
 
11
  </CALLING_SEQUENCE>
 
12
  <PARAM>
 
13
    <PARAM_INDENT>
 
14
      <PARAM_ITEM>
 
15
        <PARAM_NAME>x</PARAM_NAME>
 
16
        <PARAM_DESCRIPTION>
 
17
          <SP>: a vector of floating point or integer type numbers</SP>
 
18
        </PARAM_DESCRIPTION>
 
19
      </PARAM_ITEM>
 
20
      <PARAM_ITEM>
 
21
        <PARAM_NAME>fd</PARAM_NAME>
 
22
        <PARAM_DESCRIPTION>
 
23
          <SP>: scalar. The <VERB>fd</VERB> parameter returned by the function.  Default value is -1 which stands for the last (<VERB>mopen</VERB>) opened file.</SP>
 
24
        </PARAM_DESCRIPTION>
 
25
      </PARAM_ITEM>
 
26
      <PARAM_ITEM>
 
27
        <PARAM_NAME>type</PARAM_NAME>
 
28
        <PARAM_DESCRIPTION>
 
29
          <SP>: a string. Give the binary format used to write all the entries of x.</SP>
 
30
        </PARAM_DESCRIPTION>
 
31
      </PARAM_ITEM>
 
32
    </PARAM_INDENT>
 
33
  </PARAM>
 
34
  <DESCRIPTION>
 
35
    <P>
 
36
    The <VERB>mput</VERB> function writes data to the output specified by the
 
37
    stream parameter <VERB>fd</VERB>. Data is written at the
 
38
    position at which the file pointer is currently pointing and 
 
39
    advances the indicator appropriately. 
 
40
  </P>
 
41
    <P>
 
42
    The <VERB>type</VERB> parameter is a conversion specifier which may be set to any of the
 
43
    following flag characters (with default value &quot;l&quot;):
 
44
  </P>
 
45
    <DESCRIPTION_INDENT>
 
46
      <DESCRIPTION_ITEM label="&quot;l&quot;,&quot;i&quot;,&quot;s&quot;,&quot;ul&quot;,&quot;ui&quot;,&quot;us&quot;,&quot;d&quot;,&quot;f&quot;,&quot;c&quot;,&quot;uc&quot;">
 
47
        <SP>: for  writing respectively a long, an int, a short, an unsigned long, an unsigned int, an unsigned short, a double, a float, a char and an unsigned char. The bytes which are wrote are automatically swapped if necessary (by checking little-endian status) in order to produce machine independent binary files ( in little-endian mode). This default swapping mode can be suppressed by adding a flag in the <VERB>mopen</VERB> function.</SP>
 
48
      </DESCRIPTION_ITEM>
 
49
      <DESCRIPTION_ITEM label="&quot;..l&quot; or &quot;..b&quot;">
 
50
        <SP>: It is also possible to write in little-endian or big-endian mode  by adding a 'l' or 'b' character at the end of a type specification. For example &quot;db&quot; will write a double in big-endian mode.</SP>
 
51
      </DESCRIPTION_ITEM>
 
52
    </DESCRIPTION_INDENT>
 
53
  </DESCRIPTION>
 
54
  <EXAMPLE>
 
55
<![CDATA[
 
56
  filen = 'test.bin';
 
57
  mopen(filen,'wb');
 
58
  mput(1996,'l');mput(1996,'i');mput(1996,'s');mput(98,'c');
 
59
// force little-endian 
 
60
  mput(1996,'ll');mput(1996,'il');mput(1996,'sl');mput(98,'cl');
 
61
// force big-endian 
 
62
  mput(1996,'lb');mput(1996,'ib');mput(1996,'sb');mput(98,'cb');
 
63
//
 
64
  mclose();
 
65
  mopen(filen,'rb');
 
66
  if 1996<>mget(1,'l') then pause,end
 
67
  if 1996<>mget(1,'i') then pause,end
 
68
  if 1996<>mget(1,'s') then pause,end
 
69
  if   98<>mget(1,'c') then pause,end
 
70
  // force little-endian
 
71
  if 1996<>mget(1,'ll') then pause,end
 
72
  if 1996<>mget(1,'il') then pause,end
 
73
  if 1996<>mget(1,'sl') then pause,end
 
74
  if   98<>mget(1,'cl') then pause,end
 
75
  // force big-endian 
 
76
  if 1996<>mget(1,'lb') then pause,end
 
77
  if 1996<>mget(1,'ib') then pause,end
 
78
  if 1996<>mget(1,'sb') then pause,end
 
79
  if   98<>mget(1,'cb') then pause,end
 
80
  //
 
81
  mclose();
 
82
 ]]>
 
83
  </EXAMPLE>
 
84
  <SEE_ALSO>
 
85
    <SEE_ALSO_ITEM>
 
86
      <LINK>mclose</LINK>
 
87
    </SEE_ALSO_ITEM>
 
88
    <SEE_ALSO_ITEM>
 
89
      <LINK>meof</LINK>
 
90
    </SEE_ALSO_ITEM>
 
91
    <SEE_ALSO_ITEM>
 
92
      <LINK>mfprintf</LINK>
 
93
    </SEE_ALSO_ITEM>
 
94
    <SEE_ALSO_ITEM>
 
95
      <LINK>fprintfMat</LINK>
 
96
    </SEE_ALSO_ITEM>
 
97
    <SEE_ALSO_ITEM>
 
98
      <LINK>mfscanf</LINK>
 
99
    </SEE_ALSO_ITEM>
 
100
    <SEE_ALSO_ITEM>
 
101
      <LINK>fscanfMat</LINK>
 
102
    </SEE_ALSO_ITEM>
 
103
    <SEE_ALSO_ITEM>
 
104
      <LINK>mget</LINK>
 
105
    </SEE_ALSO_ITEM>
 
106
    <SEE_ALSO_ITEM>
 
107
      <LINK>mgetstr</LINK>
 
108
    </SEE_ALSO_ITEM>
 
109
    <SEE_ALSO_ITEM>
 
110
      <LINK>mopen</LINK>
 
111
    </SEE_ALSO_ITEM>
 
112
    <SEE_ALSO_ITEM>
 
113
      <LINK>mprintf</LINK>
 
114
    </SEE_ALSO_ITEM>
 
115
    <SEE_ALSO_ITEM>
 
116
      <LINK>mput</LINK>
 
117
    </SEE_ALSO_ITEM>
 
118
    <SEE_ALSO_ITEM>
 
119
      <LINK>mputstr</LINK>
 
120
    </SEE_ALSO_ITEM>
 
121
    <SEE_ALSO_ITEM>
 
122
      <LINK>mscanf</LINK>
 
123
    </SEE_ALSO_ITEM>
 
124
    <SEE_ALSO_ITEM>
 
125
      <LINK>mseek</LINK>
 
126
    </SEE_ALSO_ITEM>
 
127
    <SEE_ALSO_ITEM>
 
128
      <LINK>mtell</LINK>
 
129
    </SEE_ALSO_ITEM>
 
130
    <SEE_ALSO_ITEM>
 
131
      <LINK>mdelete</LINK>
 
132
    </SEE_ALSO_ITEM>
 
133
  </SEE_ALSO>
 
134
</MAN>