<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I tried to dig into the fvlib a bit and it seems that readVariableAs()<br>
performs a cast based on the data type stored in the fv file. From the<br>
DatABEL manual I gathered that you can specify a data type for fv files.<br>
Does someone know how I can read the header of an fv file to check the<br>
data type used in a give fv file?<br>
<br></blockquote><div><br></div><div style>Hope this info may be useful:</div><div style><br></div><div style><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">index file contains information about dimensions of the </span><span class="" style="font-family:arial,sans-serif;font-size:12.800000190734863px">data</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"> file, </span><span class="" style="font-family:arial,sans-serif;font-size:12.800000190734863px">data</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"> type used, and columns/rows names</span><br style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br style="font-family:arial,sans-serif;font-size:12.800000190734863px"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">The beginning is (frutil.h)</span><br style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br style="font-family:arial,sans-serif;font-size:12.800000190734863px"><pre style="white-space:pre-wrap"> unsigned short int type;
// should change that to long!!!
unsigned int nelements;
unsigned int numObservations;
unsigned int numVariables;
unsigned int bytesPerRecord;
unsigned int bitsPerRecord;
unsigned int namelength;
unsigned int reserved[RESERVEDSPACE];<br><br>then names...<br><br>where (const.h)<br><br>#define RESERVEDSPACE 5
// internal format <span class="">data</span> types
#define UNSIGNED_SHORT_INT 1
#define SHORT_INT 2
#define UNSIGNED_INT 3
#define INT 4
#define FLOAT 5
#define <span class="">DOUBLE</span> 6
#define SIGNED_CHAR 7
#define UNSIGNED_CHAR 8
// number of chars used to keep var/obs names
#define NAMELENGTH 32
<br></pre></div></div>
</div></div>