Wiki Testing/tblfmt: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
No edit summary
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[FreeForm|return to FreeForm]]
=Format Descriptions for Tabular Data=
=Format Descriptions for Tabular Data=


Line 10: Line 12:
description file.
description file.


This chapter explains how to write format descriptions for data
This page explains how to write format descriptions for data
arranged in tabular format---rows and columns---only. For data in
arranged in tabular format---rows and columns---only. For data in
non-tabular formats, see the next chapter.
non-tabular formats, see [[Wiki_Testing/arrayfmt|Array Format]].


==FreeForm ND Variable Types==
==FreeForm ND Variable Types==
Line 19: Line 21:
The data sets you produce and use may contain a variety of variable
The data sets you produce and use may contain a variety of variable
types. The characteristics of the types that FreeForm ND supports are
types. The characteristics of the types that FreeForm ND supports are
summarized in \tableref{ff,tab,datatypes}, which is followed by a
summarized in the table below, which is followed by a
description of each type.
description of each type.


   
<center>
\caption{OPeNDAP FreeForm ND Data Types}
  OPeNDAP FreeForm ND Data Types


{| border="1"  
{| border="1"  
Line 50: Line 52:
| <font color='green'>convert</font> ||  ||  || ** ||
| <font color='green'>convert</font> ||  ||  || ** ||
|-
|-
| * Expressed as the number of significant digits || || || ||
| * Expressed as the number of significant digits
|-
|-
| ** User-specified || || || ||
| ** User-specified
|-
|-
| *** Can vary depending on environment || || || ||
| *** Can vary depending on environment  


|}
|}
   
   
</center>


<blockquote>NOTE: The sizes in \tableref{ff,tab,datatypes} are machine-dependent.
<blockquote>NOTE: The sizes in table 3.1 are machine-dependent.
Those given are for most Unix workstations.  </blockquote>
Those given are for most Unix workstations.  </blockquote>




<blockquote>
; <font color='green'>char</font> :
The <font color='green'>char</font> variable type is used for character strings.
Variables of this type, including numerals, are interpreted as
characters, not as numbers.
; <font color='green'>uchar</font> :
The <font color='green'>uchar</font> (unsigned character) variable type can be used for
integers between 0 and 255 (28- 1). Variables that can be
represented by the <font color='green'>uchar</font> type (for example: month, day, hour,
minute) occur in many data sets. An advantage of using the <font color='green'>uchar</font>
type in binary formats is that only one byte is used for each
variable. Variables of this type are interpreted as numbers, not
characters.
; <font color='green'>short</font> :
A <font color='green'>short</font> variable can hold integers between -32,767 and 32,767
(<math>2^{15}- 1</math>). This type can be used for signed integers with less
than 5 digits, or for real numbers with a total of 4 or fewer digits
on both sides of the decimal point (-99 to 99 with a precision of 2,
-999 to 999 with a precision of 1, and so on).
; <font color='green'>ushort</font> :
A <font color='green'>ushort</font> (unsigned short) variable can hold integers between 0
and 65,535 (<math>2^{16} - 1</math>).
; <font color='green'>long</font> :
A <font color='green'>long</font> variable can hold integers between -2,147,483,647 and
+2,147,483,647 (<math>2^{31} - 1</math>). This variable type is commonly used
to represent floating point data as integers, which may be more
portable. It can be used for numbers with 9 or fewer digits with up
to 9 digits of precision, for example, latitude or longitude
(-180.000000 to 180.000000).
; <font color='green'>ulong</font> :
The <font color='green'>ulong</font> (unsigned long) variable type can be used for
integers between 0 and 4,294,967,295 (<math>2^{32} - 1</math>).
; <font color='green'>float, double</font> :
Numbers that include explicit decimal points are either <font color='green'>float</font>
or <font color='green'>double</font> depending on the desired number of digits. A
<font color='green'>float</font> has a maximum of 6 significant digits, a <font color='green'>double</font>
has 15 maximum. The extra digits of a <font color='green'>double</font> are useful, for
example, for precisely specifying time of day within a month as
decimal days. One second of time is approximately 0.00001 day. The
number specifying day (maximum = 31) can occupy up to 2 digits. A
<font color='green'>float</font> can therefore only specify decimal days to a whole
second (31.00001 occupies seven digits). A <font color='green'>double</font> can,
however, be used to track decimal parts of a second (for example,
31.000001).
   
   
; <font color='green'>constant</font> :
; <font color='green'>char</font> : The <font color='green'>char</font> variable type is used for character strings. Variables of this type, including numerals, are interpreted as characters, not as numbers.
FreeForm ND has two variable types, <font color='green'>constant</font> and
<font color='green'>initial</font>, for sequences of characters (or bytes) that are the
same for all records in a file. A <font color='green'>constant</font> variable is placed
into the output buffer on initialization. The <font color='green'>constant</font> value
is the same as the name of the variable. For example, given the
variable description below:
 
</blockquote>
 
<pre>
NGDCDATA 1 8 constant 0
</pre>
 
 
the string NGDCDATA, which is both the variable name and value, is
placed in characters 1-8 of each output record.
 
FreeForm ND recognizes the special <font color='green'>constant</font> type <font color='green'>NEWLINE</font>
as an end-of-line character, which is used with multi-line records.
The variable descriptions shown next are for a data record that
includes several variables, the end-of-line character, then several
more variables.
 
<pre>
year 1 2 short 0
 
.
 
.  (more variables)
 
.
latitude_sec 75 80 float 2
EOL 81 82 NEWLINE 0
longitude_deg 83 89 float 3
longitude_min 72 78 float 2
 
.
 
.  (remaining variables)
 
.
</pre>
 
The variable <font color='green'>longitude_deg</font> starts a new line in the data file.
 
; <font color='green'>initial</font> :
 
 
The variable type <font color='green'>initial</font> can be used when you want to set
 
more than one constant value at a time. It provides an
 
initialization template for the output record. This template is read
 
from a file with the same name as the <font color='green'>initial</font> variable. For
 
example, suppose you have the following variable description:
 
<pre>
seattle.ini 1 80 initial 0
</pre>
 
The initial variable is named <font color='green'>seattle.ini</font>, so the initialization
template file <font color='green'>seattle.ini</font> is read and used to initialize the
output records. Assume the Seattle template contains the following
values, which are written to an earthquake record:
 
 
<pre>
SEA19                                  SEA
</pre>
 
The other values in the output record are written over this template
resulting in a record that looks like the following:
 
<pre>
SEA19  5  -146.34172  -47.39710  1011 SEA  910802
</pre>


<blockquote>The length of the template file must equal the length of the
; <font color='green'>uchar</font> : The <font color='green'>uchar</font> (unsigned character) variable type can be used for integers between 0 and 255 (28- 1). Variables that can be represented by the <font color='green'>uchar</font> type (for example: month, day, hour, minute) occur in many data sets. An advantage of using the <font color='green'>uchar</font> type in binary formats is that only one byte is used for each variable. Variables of this type are interpreted as numbers, not characters.


record in the output format. The file name and extension are of your
; <font color='green'>short</font> : A <font color='green'>short</font> variable can hold integers between -32,767 and 32,767 (<math>2^{15}- 1</math>). This type can be used for signed integers with less than 5 digits, or for real numbers with a total of 4 or fewer digits on both sides of the decimal point (-99 to 99 with a precision of 2, -999 to 999 with a precision of 1, and so on).


choosing. }
; <font color='green'>ushort</font> : A <font color='green'>ushort</font> (unsigned short) variable can hold integers between 0 and 65,535 (<math>2^{16} - 1</math>).


; <font color='green'>convert</font> :
; <font color='green'>long</font> : A <font color='green'>long</font> variable can hold integers between -2,147,483,647 and +2,147,483,647 (<math>2^{31} - 1</math>). This variable type is commonly used to represent floating point data as integers, which may be more portable. It can be used for numbers with 9 or fewer digits with up to 9 digits of precision, for example, latitude or longitude (-180.000000 to 180.000000).


; <font color='green'>ulong</font> : The <font color='green'>ulong</font> (unsigned long) variable type can be used for integers between 0 and 4,294,967,295 (<math>2^{32} - 1</math>).


The <font color='green'>convert</font> variable type allows you to access an extensive
; <font color='green'>float, double</font> : Numbers that include explicit decimal points are either <font color='green'>float</font> or <font color='green'>double</font> depending on the desired number of digits. A <font color='green'>float</font> has a maximum of 6 significant digits, a <font color='green'>double</font> has 15 maximum. The extra digits of a <font color='green'>double</font> are useful, for example, for precisely specifying time of day within a month as decimal days. One second of time is approximately 0.00001 day. The number specifying day (maximum = 31) can occupy up to 2 digits. A <font color='green'>float</font> can therefore only specify decimal days to a whole second (31.00001 occupies seven digits). A <font color='green'>double</font> can, however, be used to track decimal parts of a second (for example, 31.000001).


set of functions for constructing output variables that do not exist
in input files, but can be computed from variables which do.
FreeForm ND can transparently identify and call conversion functions
during the data access process if you use properly named input and
output variables in variable descriptions.
See ([http://www <cite> ff,convvars</cite>]) for examples and
([http://www <cite> ff,varname</cite>]) for a complete list of names for conversion
variables.
\end{ifclear}
; <font color='green'>header</font> :
Older versions of FreeForm ND included header variables. You can now
specify header formats in format description files.
For details, see ([http://www <cite> ff,tblfmt,formatdesc</cite>]) and also
([http://www <cite> ff,hdrfmt</cite>]).
</blockquote>


==FreeForm ND File Types==
==FreeForm ND File Types==
Line 282: Line 126:
</pre>
</pre>


Lines 1 and 2 are comment lines.  Lines 4 and 8 give the format type
Lines 1 and 2 are comment lines.  Lines 4 and 8 give the format type and title. Lines 5, 6,
and title, as described in ([http://www <cite> ff,tblfmt,format</cite>]). Lines 5, 6,
9, and 10 contain variable descriptions.  Blank lines signify the end of a format
9, and 10 contain variable descriptions, described in
([http://www <cite> ff,tblfmt,var</cite>]).  Blank lines signify the end of a format
description
description


Line 313: Line 155:


A line specifying the format type and title begins a format
A line specifying the format type and title begins a format
description. A \new{format descriptor}, for example, <font color='green'>binary_data</font>, is
description. A ''format descriptor'', for example, <font color='green'>binary_data</font>, is
used to indicate format type to FreeForm ND. The \new{format title}, for
used to indicate format type to FreeForm ND. The ''format title'', for
example, "Default binary format", briefly describes the format. It
example, "Default binary format", briefly describes the format. It
must be surrounded by quotes and follow the format descriptor on the
must be surrounded by quotes and follow the format descriptor on the
Line 326: Line 168:
type, and file section. Possible values for each descriptor component
type, and file section. Possible values for each descriptor component
are shown in the following table.
are shown in the following table.
<center>


\begin{table}[htb]
Format Descriptor Components
\caption{Format Descriptor Components}
\begin{center}
{| border="1"
\begin{tabular}[t]{|l|p{1.2in}|l|} \hline
|+
\tblhd{File Type} & \tblhd{Read/Write Type
! File Type !! Read/Write Type (optional) !! File Section
 
|-
(optional)} & \tblhd{File Section}
|
\hline
{| border="1"
\begin{tabular}{l}
  |+
<font color='green'>ASCII</font>
  | <font color='green'>ASCII</font>
 
  |-
<font color='green'>binary</font>
  | <font color='green'>binary</font>
 
  |-
<font color='green'>dBASE</font>
  | <font color='green'>dBASE</font>
 
|}
\end{tabular}
||
&
{| border="1"
\begin{tabular}{l}
  |+
<font color='green'>input</font>
  | <font color='green'>input</font>
 
  |-
<font color='green'>output</font>
  | <font color='green'>output</font>
 
|}  
\end{tabular}
||
&
{| border="1"
\begin{tabular}{l}
  |+
<font color='green'>data</font>
  | <font color='green'>data</font>
 
  |-
<font color='green'>file_header</font>
  | <font color='green'>file_header</font>
 
  |-
<font color='green'>record_header</font>
  |<font color='green'>record_header</font>
 
  |-
<font color='green'>file_header_separate</font>*
  |<font color='green'>file_header_separate</font>*
 
  |-
<font color='green'>record_header_separate</font>*
  |<font color='green'>record_header_separate</font>*
 
|}
\end{tabular}
|-
 
| colspan="3" | * The qualifier <font color='green'>separate</font> indicates there is a header file separate from the data file.
 
\hline
\multicolumn{3}{p{4.5in}}{* The qualifier <font color='green'>separate</font> indicates
 
there is a header file separate from the data file.}
\end{tabular}
\end{center}
\end{table}


|}
</center>


The components of a format descriptor are separated by underscores
The components of a format descriptor are separated by underscores
Line 385: Line 223:
= <font color='green'>ASCII_data</font>, <font color='green'>binary_data</font>, or <font color='green'>dBASE_data</font>.)
= <font color='green'>ASCII_data</font>, <font color='green'>binary_data</font>, or <font color='green'>dBASE_data</font>.)


\begin{table}[htb]
<center>
\caption{Format Descriptors}
Format Descriptors
\begin{center}
\begin{tabular}[t]{|l|l|l|} \hline
\tblhd{Data} & \tblhd{Header} & \tblhd{Special}
\hline
\begin{tabular}{l}
<font color='green'>XXX_data</font>
 
<font color='green'>XXX_input_data</font>
 
<font color='green'>XXX_output_data</font>
 
\end{tabular}
&
\begin{tabular}{l}
<font color='green'>XXX_file_header</font>
 
<font color='green'>XXX_file_header_separate</font>
 
<font color='green'>XXX_record_header</font>
 
<font color='green'>XXX_record_header_separate</font>
 
<font color='green'>XXX_input_file_header</font>
 
<font color='green'>XXX_input_file_header_separate</font>
 
<font color='green'>XXX_input_record_header</font>
 
<font color='green'>XXX_input_record_header_separate</font>
 
<font color='green'>XXX_output_file_header</font>
 
<font color='green'>XXX_output_file_header_separate</font>
 
<font color='green'>XXX_output_record_header</font>
 
<font color='green'>XXX_output_record_header_separate</font>
 
\end{tabular}
&
\begin{tabular}{l}
<font color='green'>RETURN</font>*
 
<font color='green'>EOL</font>**
 
\end{tabular}
 
\hline
 
\multicolumn{3}{p{4.5in}}{* The RETURN descriptor lets FreeForm ND skip
 
over end-of-line characters in the data.}
 
 
\multicolumn{3}{p{4.5in}}{** The EOL descriptor is a constant


{| border="1"
! Data !! Header !! Special
|-
|
{| border="1"
|+
| <font color='green'>XXX_data</font>
|-
| <font color='green'>XXX_input_data</font>
|-
| <font color='green'>XXX_output_data</font>
|}
||
{| border="1"
|+
| <font color='green'>XXX_file_header</font>
|-
| <font color='green'>XXX_file_header_separate</font>
|-
| <font color='green'>XXX_record_header</font>
|-
| <font color='green'>XXX_record_header_separate</font>
|-
| <font color='green'>XXX_input_file_header</font>
|-
| <font color='green'>XXX_input_file_header_separate</font>
|-
| <font color='green'>XXX_input_record_header</font>
|-
| <font color='green'>XXX_input_record_header_separate</font>
|-
| <font color='green'>XXX_output_file_header</font>
|-
| <font color='green'>XXX_output_file_header_separate</font>
|-
| <font color='green'>XXX_output_record_header</font>
|-
| <font color='green'>XXX_output_record_header_separate</font>
|}
||
{|
|<font color='green'>RETURN</font>*
|-
|<font color='green'>EOL</font>**
|}
|-
| colspan="3" |* The RETURN descriptor lets FreeForm ND skip
over end-of-line characters in the data.
|-
| colspan="3" |** The EOL descriptor is a constant
indicating an end-of-line character should be inserted in a
indicating an end-of-line character should be inserted in a
multi-line record.
|}
</center>


multi-line record.}
For more information about header formats, see ([[Wiki_Testing/hdrfmts|Header Formats]]).
 
\end{tabular}
\end{center}
\end{table}
 
For more information about header formats, see ([http://www <cite> ff,hdrfmt</cite>])
on page 89.
 
 
 
 


===Variable Descriptions===
===Variable Descriptions===
Line 478: Line 303:
<blockquote>
<blockquote>
; Name :
; Name :
The variable name is case-sensitive, up to 63 characters long with
The variable name is case-sensitive, up to 63 characters long with
no blanks. The variable names in the example are latitude and
no blanks. The variable names in the example are latitude and
longitude. If the same variable is included in more than one format
longitude. If the same variable is included in more than one format
description within a format description file, its name must be the
description within a format description file, its name must be the
same in each format description.
same in each format description.


; Start Position :
; Start Position :
The column position where the first character (ASCII) or byte
The column position where the first character (ASCII) or byte
(binary) of a variable value is placed. The first position is 1, not
(binary) of a variable value is placed. The first position is 1, not
0. In the example, the variable latitude is defined to start at
0. In the example, the variable latitude is defined to start at
position 1 and longitude at 12.
position 1 and longitude at 12.


; End Position :
; End Position :
The column position where the last character (ASCII) or byte
The column position where the last character (ASCII) or byte
(binary) of a variable value is placed. In the example, the variable
(binary) of a variable value is placed. In the example, the variable
latitude is defined to end at position 10 and longitude at 22.
latitude is defined to end at position 10 and longitude at 22.


; Type :
; Type :
The variable type can be a standard type such as char, float,
The variable type can be a standard type such as char, float,
double, or a special FreeForm ND type. The type for both variables
double, or a special FreeForm ND type. The type for both variables
 
in the example is double. See above for
in the example is double. See ([http://www <cite> ff,tblfmt,vartypes</cite>]) for
 
descriptions of supported types.
descriptions of supported types.


; Precision :
; Precision :
Precision defines the number of digits to the right of the decimal
Precision defines the number of digits to the right of the decimal
point. For float or double variables, precision only controls the
point. For float or double variables, precision only controls the
number of digits printed or displayed to the right of the decimal
number of digits printed or displayed to the right of the decimal
point in an ASCII representation. The precision for both variables
point in an ASCII representation. The precision for both variables
in the example is 6.


in the example is 6.
</blockquote>
</blockquote>

Latest revision as of 23:45, 6 October 2009

return to FreeForm

Format Descriptions for Tabular Data

Format descriptions define the formats of input and output data and headers. FreeForm ND provides an easy-to-use mechanism for describing data. FreeForm ND programs and FreeForm ND-based applications that you develop use these format descriptions to correctly access data. Any data file used by FreeForm ND programs must be described in a format description file.

This page explains how to write format descriptions for data arranged in tabular format---rows and columns---only. For data in non-tabular formats, see Array Format.

FreeForm ND Variable Types

The data sets you produce and use may contain a variety of variable types. The characteristics of the types that FreeForm ND supports are summarized in the table below, which is followed by a description of each type.

OPeNDAP FreeForm ND Data Types
Name Minimum Value Maximum Value Size in Bytes Precision*
char **
uchar 0 255 1
short -32,767 32,767 2
ushort 0 65,535 2
long -2,147,483,647 2,147,483,647 4
ulong 0 4,294,967,295 4
float 4 6***
double 8 15***
constant **
initial record length
convert **
* Expressed as the number of significant digits
** User-specified
*** Can vary depending on environment

NOTE: The sizes in table 3.1 are machine-dependent. Those given are for most Unix workstations.


char
The char variable type is used for character strings. Variables of this type, including numerals, are interpreted as characters, not as numbers.
uchar
The uchar (unsigned character) variable type can be used for integers between 0 and 255 (28- 1). Variables that can be represented by the uchar type (for example: month, day, hour, minute) occur in many data sets. An advantage of using the uchar type in binary formats is that only one byte is used for each variable. Variables of this type are interpreted as numbers, not characters.
short
A short variable can hold integers between -32,767 and 32,767 (). This type can be used for signed integers with less than 5 digits, or for real numbers with a total of 4 or fewer digits on both sides of the decimal point (-99 to 99 with a precision of 2, -999 to 999 with a precision of 1, and so on).
ushort
A ushort (unsigned short) variable can hold integers between 0 and 65,535 ().
long
A long variable can hold integers between -2,147,483,647 and +2,147,483,647 (). This variable type is commonly used to represent floating point data as integers, which may be more portable. It can be used for numbers with 9 or fewer digits with up to 9 digits of precision, for example, latitude or longitude (-180.000000 to 180.000000).
ulong
The ulong (unsigned long) variable type can be used for integers between 0 and 4,294,967,295 ().
float, double
Numbers that include explicit decimal points are either float or double depending on the desired number of digits. A float has a maximum of 6 significant digits, a double has 15 maximum. The extra digits of a double are useful, for example, for precisely specifying time of day within a month as decimal days. One second of time is approximately 0.00001 day. The number specifying day (maximum = 31) can occupy up to 2 digits. A float can therefore only specify decimal days to a whole second (31.00001 occupies seven digits). A double can, however, be used to track decimal parts of a second (for example, 31.000001).


FreeForm ND File Types

FreeForm ND supports binary, ASCII, and dBASE file types. Binary data are stored in a fixed amount of space with a fixed range of values. This is a very efficient way to store data, but the files are machine-readable rather than human-readable. Binary numbers can be integers or floating point numbers.

Numbers and character strings are stored as text strings in ASCII. The amount of space used to store a string is variable, with each character occupying one byte.

The dBASE file type, used by the dBASE product, is ASCII text without end-of-line markers.

Format Description Files

Format description files accompany data files. A format description file can contain descriptions for one or more formats. You include descriptions for header, input, and output formats as appropriate. Format descriptions for more than one file may be included in a single format description file.

An example format description file is shown next. The sections that follow describe each element of a format description file.

/ This format description file is for
/ data files latlon.bin and latlon.dat.

binary_data "Default binary format"
latitude 1 4 long 6
longitude 5 8 long 6

ASCII_data "Default ASCII format"
latitude 1 10 double 6
longitude 12 22 double 6

Lines 1 and 2 are comment lines. Lines 4 and 8 give the format type and title. Lines 5, 6, 9, and 10 contain variable descriptions. Blank lines signify the end of a format description


You can include blank lines between format descriptions and comments in a format description file as necessary. Comment lines begin with a slash (/). FreeForm ND ignores comments.

Format Descriptions

A format description file comprises one or more format descriptions. A format description consists of a line specifying the format type and title followed by one or more variable descriptions, as in the following example:

binary_data "Default binary format"
latitude 1 4 long 6
longitude 5 8 long 6

Format Type and Title

A line specifying the format type and title begins a format description. A format descriptor, for example, binary_data, is used to indicate format type to FreeForm ND. The format title, for example, "Default binary format", briefly describes the format. It must be surrounded by quotes and follow the format descriptor on the same line. The maximum number of characters for the format title is 80 including the quotes.

Format Descriptors

Format descriptors indicate (in the order given) file type, read/write type, and file section. Possible values for each descriptor component are shown in the following table.

Format Descriptor Components

File Type Read/Write Type (optional) File Section
ASCII
binary
dBASE
input
output
data
file_header
record_header
file_header_separate*
record_header_separate*
* The qualifier separate indicates there is a header file separate from the data file.

The components of a format descriptor are separated by underscores (_). For example, ASCII_output_data indicates that the format description is for ASCII data in an output file. The order of descriptors in a format description should reflect the order of format types in the file. For instance, the descriptor ASCII_file_header would be listed in the format description file before ASCII_data. The format descriptors you can use in FreeForm ND are listed in the next table, where XXX stands for ASCII, binary, or dBASE. (Example: XXX_data = ASCII_data, binary_data, or dBASE_data.)

Format Descriptors

Data Header Special
XXX_data
XXX_input_data
XXX_output_data
XXX_file_header
XXX_file_header_separate
XXX_record_header
XXX_record_header_separate
XXX_input_file_header
XXX_input_file_header_separate
XXX_input_record_header
XXX_input_record_header_separate
XXX_output_file_header
XXX_output_file_header_separate
XXX_output_record_header
XXX_output_record_header_separate
RETURN*
EOL**
* The RETURN descriptor lets FreeForm ND skip

over end-of-line characters in the data.

** The EOL descriptor is a constant

indicating an end-of-line character should be inserted in a multi-line record.

For more information about header formats, see (Header Formats).

Variable Descriptions

A variable description defines the name, start and end column position, type, and precision for each variable. The fields in a variable description are separated by white space. Two variable descriptions are shown below with the fields indicated. Each field is then described.

Here are two example variable descriptions. Each one consists of a name, a start position, and end position, a type, and a precision.

latitude    1  10  double  6
longitude  12  22  double  6
Name

The variable name is case-sensitive, up to 63 characters long with no blanks. The variable names in the example are latitude and longitude. If the same variable is included in more than one format description within a format description file, its name must be the same in each format description.

Start Position

The column position where the first character (ASCII) or byte (binary) of a variable value is placed. The first position is 1, not 0. In the example, the variable latitude is defined to start at position 1 and longitude at 12.

End Position

The column position where the last character (ASCII) or byte (binary) of a variable value is placed. In the example, the variable latitude is defined to end at position 10 and longitude at 22.

Type

The variable type can be a standard type such as char, float, double, or a special FreeForm ND type. The type for both variables in the example is double. See above for descriptions of supported types.

Precision

Precision defines the number of digits to the right of the decimal point. For float or double variables, precision only controls the number of digits printed or displayed to the right of the decimal point in an ASCII representation. The precision for both variables in the example is 6.