  ------------------------------------------------------------------------
  Country unit                              by Sebastian Groeneveld (2000)
  ------------------------------------------------------------------------

  Usage
  =====

  Add the following line to your program:

  $INCLUDE "Country.inc"


  New datatype
  ============

  The CountryInfo datatype has been defined as follows:

    TYPE CountryInfo
        DateFormat      AS WORD
        Currency        AS ASCIIZ * 5
        Thousands       AS ASCIIZ * 2
        Decimals        AS ASCIIZ * 2
        DateSep         AS ASCIIZ * 2
        TimeSep         AS ASCIIZ * 2
        CurrencyFlags   AS BYTE
        CurrencyDigits  AS BYTE
        TimeFormat      AS BYTE
        CaseMap         AS DWORD
        DataSep         AS ASCIIZ * 2
        Reserved        AS STRING * 10
        CountryCode     AS INTEGER
    END TYPE


  Public routine
  ==============

  FUNCTION GetCountryInfo( C AS CountryInfo ) AS INTEGER

  This routine fills variable C with country related information. This
  information depends on the country setting in your CONFIG.SYS file.
  It seems that this information will always be found (even if no country
  setting has been specified in your CONFIG.SYS). The function returns 0
  if the information could NOT be found, and -1 on success.



  Fields
  ======

  - DateFormat
      0 = USA    (mm-dd-yy)
      1 = Europe (dd-mm-yy)
      2 = Japan  (yy-mm-dd)

  - TimeFormat
      0 = 12-hour
      1 = 24-hour

  - Currency (max. 4 chars long!)

  - CurrencyFlags
      0 = $123.00
      1 = 123.00$
      2 = $ 123.00
      3 = 123.00 $

  - CurrencyDigits (nr of decimals)
      1 = $123.0
      2 = $123.00
      3 = $123.000
       etc...

  - CaseMap (32-bit pointer)
      List of ASCII weigh factors

  - DateSep
      - = mm-dd-yy
      / = mm/dd/yy
      . = mm.dd.yy

  - TimeSep
      : = hh:mm:ss
      . = hh.mm.ss

  - Thousands
      , = 1,000
      . = 1.000
        = 1 000

  - Decimals
      . = 123.00
      , = 123,00


  Example
  =======

  $INCLUDE "Country.inc"

  DIM C AS CountryInfo

  IF GetCountryInfo( C ) THEN

      'Let PowerBasic automatically use the proper characters for USING$
      'by setting the internal variable pbvUsingChrs. Note that we cannot
      'change the dollar sign, since C.Currency can be up to 4 chars long.

      pbvUsingChrs = "*$" + C.Thousands + C.Decimals

  END IF
