Home > atmlab > arts > xml > xmlWriteNumeric.m

xmlWriteNumeric

PURPOSE ^

Writes a Numeric to an XML file.

SYNOPSIS ^

function xmlWriteNumeric(fid, fidb, data, precision)

DESCRIPTION ^

 Writes a Numeric to an XML file.

    Internal function that should never be called directly.
    Use *xmlStore* instead.

 FORMAT   xmlWriteNumeric(fid, fidb, data, precision)

 IN    fid        File descriptor
 IN    fidb       File descriptor for binary file
 IN    data       Numeric
 IN    precision  Precision for floats

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

xmlWriteNumeric.m

SOURCE CODE ^

0001 % Writes a Numeric to an XML file.
0002 %
0003 %    Internal function that should never be called directly.
0004 %    Use *xmlStore* instead.
0005 %
0006 % FORMAT   xmlWriteNumeric(fid, fidb, data, precision)
0007 %
0008 % IN    fid        File descriptor
0009 % IN    fidb       File descriptor for binary file
0010 % IN    data       Numeric
0011 % IN    precision  Precision for floats
0012 
0013 % 2002-12-17  Created by Oliver Lemke.
0014 
0015 function xmlWriteNumeric(fid, fidb, data, precision)
0016 
0017 xmlWriteTag (fid, 'Numeric', []);
0018 
0019 if (strcmp(precision, 'BINARY'))
0020     fwrite (fidb, data, 'double');
0021 else
0022     fprintf (fid, [xmlGetPrecisionFormatString(precision) '\n'], data);
0023 end
0024 
0025 xmlWriteCloseTag (fid, 'Numeric');
0026

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005