home *** CD-ROM | disk | FTP | other *** search
- { (C) Copyright 1986-1992 MetaWare Incorporated; Santa Cruz, CA 95060. }
-
- pragma c_include('implement.pf');
- package Conversions;
- type Real = Standard.Real; -- In case of VS Pascal, where real is redefined.
- pragma Routine_aliasing_convention(Implement.RTE_aliasing);
- { String to real. Accepts full PP lexicon for reals. }
- function StoR(const S:String):Real; external;
- function StoD(const S:String):Longreal; external;
- function StoX(const S:String):Extreal; external;
-
- { Convert real to string as if write(R:Field_width:After_dot) were given.}
- procedure RtoS(R:real; Field_width, After_dot: Integer; var S:String);
- external;
- { Same, but with longreal. }
- procedure DtoS(R:longreal; Field_width, After_dot: Integer; var S:String);
- external;
- { Same, but with extreal. }
- procedure XtoS(R:extreal; Field_width, After_dot: Integer; var S:String);
- external;
-
- { String to integer. Accepts full PP lexicon for integers, such }
- { as 2#1101 and 1_334. }
- { Bad input causes Errno to be set to other than No_error_occurred. }
- function StoI(const S:String):Longint; external;
-
- { The plan is to eventually replace this package with procedures }
- { "readstr" and "writestr" that act just like read and write, }
- { but take strings rather than files. }
- end;
-