home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c220 / 4.ddi / LIB / SRC / CONVERTS.PF < prev    next >
Encoding:
Text File  |  1990-12-16  |  1.3 KB  |  29 lines

  1. pragma c_include('implement.pf');
  2. package Conversions;
  3.    type Real = Standard.Real;      -- In case of VS Pascal, where real is redefined.
  4.    pragma Routine_aliasing_convention(Implement.RTE_aliasing);
  5.    { String to real.  Accepts full PP lexicon for reals.    }
  6.    function StoR(const S:String):Real;            external;
  7.    function StoD(const S:String):Longreal;        external;
  8.    function StoX(const S:String):Extreal;        external;
  9.  
  10.    { Convert real to string as if write(R:Field_width:After_dot) were given.}
  11.    procedure RtoS(R:real; Field_width, After_dot: Integer; var S:String);
  12.                              external;
  13.    { Same, but with longreal.                        }
  14.    procedure DtoS(R:longreal; Field_width, After_dot: Integer; var S:String);
  15.                              external;
  16.    { Same, but with extreal.                        }
  17.    procedure XtoS(R:extreal; Field_width, After_dot: Integer; var S:String);
  18.                              external;
  19.  
  20.    { String to integer.  Accepts full PP lexicon for integers, such    }
  21.    { as 2#1101 and 1_334.                        }
  22.    { Bad input causes Errno to be set to other than No_error_occurred.  }
  23.    function StoI(const S:String):Longint;        external;
  24.  
  25.    { The plan is to eventually replace this package with procedures    }
  26.    { "readstr" and "writestr" that act just like read and write,    }
  27.    { but take strings rather than files.                }
  28.    end;
  29.