NUMTYPES.MOD 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. IMPLEMENTATION MODULE NumTypes;
  2. (*
  3. * REPERTOIRE
  4. * Release 1.6
  5. * By Charles Bradford and Cole Brecheen
  6. * (c) Copyright 1985-1990 PMI
  7. * Portland, Oregon
  8. * All rights reserved
  9. * (503) 236-1788
  10. *
  11. * $Header: D:/logfiles/masters/numtmod.jpv 1.1 03 Dec 1990 22:49:30 coleb $
  12. *
  13. *)
  14. VAR
  15. Initialized : BOOLEAN;
  16. PROCEDURE Init();
  17. BEGIN
  18. IF Initialized THEN
  19. RETURN;
  20. ELSE
  21. Initialized := TRUE;
  22. END;
  23. L0 := VAL( LONGINT, 0 );
  24. L1 := VAL( LONGINT, 1 );
  25. L2 := VAL( LONGINT, 2 );
  26. L65535 := VAL( LONGINT, 65535 );
  27. R8TenPowers[0] := 10.0;
  28. R8TenPowers[1] := 100.0;
  29. R8TenPowers[2] := 10000.0;
  30. R8TenPowers[3] := 1.0E8;
  31. R8TenPowers[4] := 1.0E16;
  32. R8TenPowers[5] := 1.0E32;
  33. R8TenPowers[6] := 1.0E64;
  34. R8TenPowers[7] := 1.0E128;
  35. R8TenPowers[8] := 1.0E256;
  36. END Init;
  37. (* JPI version *)
  38. PROCEDURE REALToReal8( TheReal: REAL ): Real8;
  39. BEGIN
  40. RETURN VAL( Real8, TheReal );
  41. END REALToReal8;
  42. PROCEDURE Real8ToREAL( TheReal8: Real8 ): REAL;
  43. BEGIN
  44. RETURN VAL( REAL, TheReal8 );
  45. END Real8ToREAL;
  46. BEGIN
  47. Initialized := FALSE;
  48. END NumTypes.