Scilab Function

mput - writes byte or word in a given binary format

Calling Sequence

mput(x [,type,fd])

Parameters

Description

The mput function writes data to the output specified by the stream parameter fd. Data is written at the position at which the file pointer is currently pointing and advances the indicator appropriately.

The tye parameter is a conversion specifier which may be set to any of the following flag characters (with default value "l"):

  • "l","i","s","ul","ui","us","d","f","c","uc" : 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 mopen function.
  • "..l" or "..b" : 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 "db" will write a double in big-endian mode.
  • Examples

    See Also