This configuration files section defines the numeric formats used by default in XQuad.
Numeric formats can be created and modified in the 'Numeric
Format' dialog box.
Format list definition section: \FORMATLIST{...}
This section presents the format-list accessible from XQuad. The definition of formats
from the list appears between the opening bracket "{" and corresponding closing
bracket "}". Each element of the format list is defined as described below.
Format definition section: \FORMAT{...}
A format is defined by \FORMATX where X is an entity which
uniquely identifies the format.
Watch out for problems that might occur when using more than one configuration file.
Preventive measures must be in place in order to insure that the same name is not used
more than once between the system configuration files (xquadrc) and the user configuration
files (.xquadrc). To avoid this, the user configuration files can be set to start with X
at 100.
Formats definition parameters appear between the opening bracket "{"
and corresponding closing bracket "}". They contain:
- \NAME{name} where name represents the name attributed to the format
in corresponding XQuad menus.
- \LOCK locks a format defined in the XQuad format base so that it cannot be
deleted from the 'Numeric Format' dialog box.
- \HIDE hides the defined format so that it does not appear in XQuad format lists.
Each numeric format allows formatting of a specific type of number. According to the format
type (standard numbers, boolean values, the format parameters are not always the same.
Only available parameters are taken into account.
The format types and its options are:
- \NORMAL_TYPE is a format type is for simple numeric values. The available
parameters are:
- \MIN_PRECX where X represents the minimum precision in drawing of
decimal numbers.
- \MAX_PRECX where X represents the maximal precision in drawing of
decimal numbers.
- \TRUNCATE_ENABLE allows XQuad to truncate decimal numbers in drawing.
- \COMMAX where X represents the ASCII code of the separator between the integer part and
the decimal part of the numbers.
- \SPACEX where X represents how many numbers of the integer part are
grouped. Groups are separated
by the integer part separator.
- \CHARSEPX where X represents the ASCII code of the separator between groups of the
integer part of the numbers.
- \COLORPOSX where X represents a color
identifier in the color list which will be used to draw positive numbers.
- \COLORNEGX where X represents a color
identifier in the color list which will be used to draw negative numbers.
- \STANDARD marks the format as the default format. There can only be one in
the format list, preferably with a normal type and decimal truncating enabled.
- \THOUSANDS marks the format as the default thousands numeric format, which is
used when clicking on the first icon button of
the fourth section of the 'General Functions' toolbar. There can only be one in the
format list, preferably with a normal type.
- \UNIT_TYPE is a format type is for numeric values requiring an identifying unit
(monetary formats, for example). The available parameters are:
- \UNIT_AFTER indicates the unit label will be drawn after the number.
- \UNIT_NAME{unit label} indicates the unit label text to draw before or
after the number.
- \MIN_PRECX where X represents the minimum precision in drawing of
decimal numbers.
- \MAX_PRECX where X represents the maximal precision in drawing of
decimal numbers.
- \COMMAX where X represents the ASCII code of the separator between the integer part and
the decimal part of the numbers.
- \SPACEX where X represents how many numbers of the integer part are
grouped. Groups are separated
by the integer part separator.
- \CHARSEPX where X represents the ASCII code of the separator between of the integer
part of the numbers.
- \COLORPOSX where X represents a color
identifier in the color list which will be used to draw positive numbers.
- \COLORNEGX where X represents a color
identifier in the color list which will be used to draw negative numbers.
- \CURRENCY marks the format as the default currency numeric format, which is used
when clicking on the second icon button of the
fourth section of the 'General Functions' toolbar. There can only be one in the
format list, preferably with a unit type.
- \PERCENT_TYPE is a format type is for numeric values to be displayed as
percentage values (numbers followed by % sign). The available parameters are:
- \MIN_PRECX where X represents the minimum precision in drawing of
decimal numbers.
- \MAX_PRECX where X represents the maximal precision in drawing of
decimal numbers.
- \COMMAX where X represents the ASCII code of the separator between the integer part and
the decimal part of the numbers.
- \SPACEX where X represents how many numbers of the integer part are
grouped. Groups are separated
by the integer part separator.
- \CHARSEPX where X represents the ASCII code of the separator between groups of the
integer part of the numbers.
- \COLORPOSX where X represents a color
identifier in the color list which will be used to draw positive numbers.
- \COLORNEGX where X represents a color
identifier in the color list which will be used to draw negative numbers.
- \PERCENT marks the format as the default percentage numeric format, which is used
when clicking on the third icon button of the
fourth section of the General Functions' toolbar. There can only be one in the
format list, preferably with a percentage type.
- \EXPONANTIAL_TYPEis a format type is for numeric values requiring in an
exponential form (for example: 1.123E+15). The available parameters are:
- \MIN_PRECX where X represents the minimum precision in drawing of
decimal numbers.
- \MAX_PRECX where X represents the maximal precision in drawing of
decimal numbers.
- \COMMAX where X represents the ASCII code of the separator between the integer part and
the decimal part of the numbers.
- \EXP_STRING{exponent label} indicates the exponent label text..
- \EXP_DIGITX where X represents the minimum number of digits in the
exponent.
- \EXP_MULTIPLEX where X represents the number which the exponent
must be multiple of.
- \EXP_SIGN indicates that the exponent's
sign must always be displayed.
- \UNIT_AFTER indicates the unit label will be drawn after the number.
- \UNIT_NAME{unit label} indicates the unit label text to draw before or
after the number.
- \COLORPOSX where X represents a color
identifier in the color list which will be used to draw positive numbers.
- \COLORNEGX where X represents a color
identifier in the color list which will be used to draw negative numbers.
- \SCIENTIFIC marks the format as the default scientific numeric format, which is
used when clicking on the fourth icon button
of the fourth section of the 'General Functions' toolbar. There can only be one in
the format list, preferably with a unit type.
- \ENGINEER marks the format as the default engineer numeric format, which is used
when clicking on the last icon button of the
fourth section of the 'General Functions' toolbar. There can only be one in the
format list, preferably with a unit type.
- \FRACTION_TYPE is a format type is for numbers to be displayed as numeric
fractions (0,125 will be displayed as 1/8). The available parameters are:
- \BOOLEAN_TYPE is a format type is for boolean values. The available parameters
are:
- \TRUE_NAME{true text} indicates the text to use when a number has the
value TRUE.
- \FALSE_NAME{false text} indicates the text to use when a number has the
value FALSE.
- \TRUE_COLORX where X represents a color
identifier in the color list which will be used when a number has the value TRUE.
- \FALSE_COLORX where X represents a color
identifier in the color list which will be used when a number has the value FALSE.
- \DAY_TYPE is a format type is for numbers to be displayed as the names of days of
the week ("Monday" for example). The available parameters are:
- \MONTH_TYPEis a format type is for numbers to be displayed as the names of months
of the year ("January" for example). The available parameters are:
- \MONTH_NAME_VERY_SHORT indicates that the month name must be the shortest possible.
- \MONTH_NAME_SHORT indicates that the month name must be three letters long.
- \MONTH_NAME_LONG indicates that the month name must be the full name.
- \TIME_TYPEis a format type is for numbers to be displayed as time (14:21:12PM for
example) The parameter is:
- \TIME_SEQUENCE{...}. This section presents the parameter list for the time format
composition. The options of the format appear in a specific order between the opening
bracket "{" and corresponding closing bracket "}". Each element of the
time format is defined as described below:
- \PADDING_NONE indicates that remaining of the sequence (until the next \PADDING_XXX)
will not use a padding character.
- \PADDING_ZERO indicates that remaining of the sequence (until the next \PADDING_XXX)
will use "0" as the padding
character.
- \PADDING_SPACE indicates that remaining of the sequence (until the next \PADDING_XXX)
will use " " as the padding
character.
- \HOUR adds the hour (24) part of
the time to the format.
- \HOUR12 adds the hour (12) part
of the time to the format.
- \HOUR_AM_PM adds the part of the day
(AM/PM) to the format.
- \MINUTE adds the minutes part
of the time to the format.
- \SECOND adds the seconds part
of the time to the format.
- \TENTH_OF_SECOND adds the tenths
of second part of the time to the format.
- \HUNDREDTH_OF_SECOND adds the hundredths
of second part of the time to the format.
- \HUNDREDTH_OF_SECOND adds the thousandths
of second part of the time to the format.
- \STRING{...} adds the character string to the format.
- \DATE_TYPEis a format type is for numbers to be displayed as dates (25/12/1995
for example). The parameter is:
- \DATE_SEQUENCE{...}. This section presents the parameter list for the date format
composition. The options of the format appear in a specific order between the opening
bracket "{" and corresponding closing bracket "}". Each element of the
date format is defined as described below:
- \PADDING_NONE indicates that remaining of the sequence (until the next \PADDING_XXX)
will not use a padding character.
- \PADDING_ZERO indicates that remaining of the sequence (until the next \PADDING_XXX)
will use "0" as the padding
character.
- \PADDING_SPACE indicates that remaining of the sequence (until the next \PADDING_XXX)
will use " " as the padding
character.
- \YEAR adds the year part of the
date to the format.
- \YEAR_SHORT adds the year part of the date in a short form to the format.
- \YEAR_JC_REF adds the year part of the date from J.C. to the format.
- \MONTH adds the month part
(number in [1;12]) of the date to the format.
- \MONTH_NAME_VERY_SHORT adds the month
name of the date in the shortest
possible form to the format.
- \MONTH_NAME_SHORT adds the month
name of the date in a three
letters form to the format.
- \MONTH_NAME_LONG adds the month
full name of the date to the
format.
- \WEEK adds the week in the year
of the date to the format.
- \DAY adds the day in the month of
the date to the format.
- \DAY_NAME_VERY_SHORT adds the day
name in the week of the date in the shortest possible form to the format.
- \DAY_NAME_SHORT adds the day name
in the week of the date in a three
letters form to the format.
- \DAY_NAME_LONG adds the day full name in the week of the date the
format.
- \DAY_IN_YEAR adds the day in
the year of the date to the format.
- \STRING{...} adds the character string to the format.
- \DATE_AND_TIME_TYPE is a format type is for numbers to be displayed as dates
followed by time (25/12/1995 14:21 PM for example). The parameter is:
- \DATE_AND_TIME_SEQUENCE{...}. This section presents the parameter list for the
date and time format composition. The options of the format appear in a specific order
between the opening bracket "{" and corresponding closing bracket "}".
Each element of the date and time format is defined as described below:
- \PADDING_NONE indicates that remaining of the sequence (until the next \PADDING_XXX)
will not use a padding character.
- \PADDING_ZERO indicates that remaining of the sequence (until the next \PADDING_XXX)
will use "0" as the padding
character.
- \PADDING_SPACE indicates that remaining of the sequence (until the next \PADDING_XXX)
will use " " as the padding
character.
- \YEAR adds the year part of the
date to the format.
- \YEAR_SHORT adds the year part of the date in a short form to the format.
- \YEAR_JC_REF adds the year part of the date from J.C. to the format.
- \MONTH adds the month part
(number in [1;12]) of the date to the format.
- \MONTH_NAME_VERY_SHORT adds the month
name of the date in the shortest
possible form to the format.
- \MONTH_NAME_SHORT adds the month
name of the date in a three
letters form to the format.
- \MONTH_NAME_LONG adds the month
full name of the date to the
format.
- \WEEK adds the week in the year
of the date to the format.
- \DAY adds the day in the month of
the date to the format.
- \DAY_NAME_VERY_SHORT adds the day
name in the week of the date in the shortest possible form to the format.
- \DAY_NAME_SHORT adds the day name
in the week of the date in a three
letters form to the format.
- \DAY_NAME_LONG adds the day full name in the week of the date the
format.
- \DAY_IN_YEAR adds the day in
the year of the date to the format.
- \HOUR adds the hour (24) part of
the time to the format.
- \HOUR12 adds the hour (12) part
of the time to the format.
- \HOUR_AM_PM adds the part of the day
(AM/PM) to the format.
- \MINUTE adds the minutes part
of the time to the format.
- \SECOND adds the seconds part
of the time to the format.
- \TENTH_OF_SECOND adds the tenths
of second part of the time to the format.
- \HUNDREDTH_OF_SECOND adds the hundredths
of second part of the time to the format.
- \HUNDREDTH_OF_SECOND adds the thousandths
of second part of the time to the format.
- \STRING{...} adds the character string to the format.
A special numeric format must appear in one of the configuration files. This format must
be named "Generic" and must be defined with the most basic parameters possible
more the \GENERIC parameter. In special cases, this generic format will be applied
to the cells when the format type is not suitable with the content.
Example :
\FORMATLIST{
\FORMAT0{\NAME{Standard} \COMMA44
\TRUNCATE_ENABLE
\NORMAL_TYPE
\STANDARD}
\FORMAT10{\NAME{Money [2d, neg. red]}
\MIN_PREC2
\MAX_PREC2
\SPACE3
\UNIT{$}
\COMMA44
\COLORNEG6 \UNIT_TYPE
\CURRENCY}
\FORMAT30{\NAME{Date [MM/DD/YY]}
\DATE_SEQUENCE{
\PADDING_ZERO
\DAY
\STRING{/}
\MONTH \STRING{/}
\YEAR_SHORT}
\DATE_TYPE}
\FORMAT34{\NAME{Time [HH:MM:SS [AP]M]}
\TIME_SEQUENCE{
\PADDING_SPACE
\HOUR12
\STRING{:}
\PADDING_ZERO
\MINUTE
\STRING{:} \SECOND
\STRING{\x20}
\HOUR_AM_PM}
\TIME_TYPE}
}
