home *** CD-ROM | disk | FTP | other *** search
/ Prima Shareware 3 / DuCom_Prima-Shareware-3_cd1.bin / PROGRAMO / PASCAL / WINTL / EXAMPLE.PAS next >
Encoding:
Pascal/Delphi Source File  |  1994-09-12  |  1.8 KB  |  49 lines

  1. {
  2.  Example on using WINTL.PAS
  3. }
  4.  
  5. Uses
  6.   WIntl,
  7.   WinCRT;
  8.  
  9. Var
  10.   CIR1, CIR2 : CountryInfoRec;
  11.  
  12. Begin
  13.   {Get the country information from DOS}
  14.   GetDOSCountryInfo(CIR1);
  15.   {Display the information obtained in the CountryInfoRec}
  16.   With CIR1 Do
  17.   Begin
  18.     WriteLn('DOS reports this country info ---> ');
  19.     Write('Current country code is : ',CountryCode);
  20.     WriteLn(' (',CountryAsString(CountryCode,DOS),')');
  21.     WriteLn('Date format code is : ',DateFormat,' (0=US, 1=Europe, 2=Japan)');
  22.     WriteLn('Date uses separator : ',DateSeparator);
  23.     WriteLn('Time format code is : ',TimeFormat,' (0=12h, 1=24h)');
  24.     WriteLn('Time uses separator : ',TimeSeparator);
  25.     WriteLn('Currency symbol is : ',CurrencySymbol);
  26.     WriteLn('Thousand separator is : ',ThousandSeparator);
  27.     WriteLn('Decimal separator is : ',DecimalSeparator);
  28.     WriteLn('Digits after decimal in currency : ',DigitsAfterDecimal);
  29.     WriteLn;
  30.   End;
  31.   {Get the country information from Windows}
  32.   GetWinCountryInfo(CIR2);
  33.   {Display the information obtained in the CountryInfoRec}
  34.   With CIR2 Do
  35.   Begin
  36.     WriteLn('Windows reports this country info ---> ');
  37.     Write('Current country code is : ',CountryCode);
  38.     WriteLn(' (',CountryAsString(CountryCode,WIN),')');
  39.     WriteLn('Date format code is : ',DateFormat,' (0=US, 1=Europe, 2=Japan)');
  40.     WriteLn('Date uses separator : ',DateSeparator);
  41.     WriteLn('Time format code is : ',TimeFormat,' (0=12h, 1=24h)');
  42.     WriteLn('Time uses separator : ',TimeSeparator);
  43.     WriteLn('Currency symbol is : ',CurrencySymbol);
  44.     WriteLn('Thousand separator is : ',ThousandSeparator);
  45.     WriteLn('Decimal separator is : ',DecimalSeparator);
  46.     WriteLn('Digits after decimal in currency : ',DigitsAfterDecimal);
  47.     WriteLn;
  48.   End;
  49. End.