Note: This page describes the development version of GPSBabel. It may substantially differ from the latest released GPSBabel.

Internal Constants

A few internal constants are defined in the XCSV parser to make the style file simpler. They may or may not be used and are optional in most cases. Note that only certain style file directives map these constants.

Style ConstantMaps to Char(s)
COMMA,
COMMASPACE,<space>
SINGLEQUOTE'
DOUBLEQUOTE"
COLON:
SEMICOLON;
NEWLINE\n
CR\r
CRNEWLINE\r\n
TAB\t
SPACE<space>
HASH#
PIPE|
WHITESPACEsee below

WHITESPACE

The WHITESPACE constant has special properties. When reading data, WHITESPACE refers to sequential runs of SPACES and/or TABS. When writing data, WHITESPACE is always a single SPACE.

For example, the following line:

SOME_NAME       30.1208 -91.1365    SOME OTHER NAME

Parses into the following data fields:

SOME_NAME,30.1208,-91.1365,SOME,OTHER,NAME

COMMENTS

Anything after a hash (#) on a line is not parsed. For example:

#THIS ENTIRE LINE IS A COMMENT.
#FIELD   LAT_DECIMAL, "", "%f"   THIS ENTIRE LINE IS A COMMENT
FIELD LAT_DECIMAL, "", "%f"  # ONLY THIS SENTENCE IS A COMMENT.