MATHLIB0.LST 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * MATHLIB0.MOD - Trigonometry (core library) *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1987..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 IMPLEMENTATION MODULE MathLib0;
  13. 12
  14. 13 FROM MATHLIB IMPORT ATan, Cos, Exp, Log, Sin, Sqrt;
  15. 14
  16. 15
  17. 16 PROCEDURE arctan( r: REAL) : REAL;
  18. 17 BEGIN
  19. 18 RETURN REAL( ATan( LONGREAL( r)));
  20. ***** ^ not supported yet
  21. ***** ^ not supported yet
  22. 19 END arctan;
  23. ***** ^ not supported yet
  24. 20
  25. 21
  26. 22 PROCEDURE cos( r: REAL) : REAL;
  27. 23 BEGIN
  28. 24 RETURN REAL( Cos( LONGREAL( r)));
  29. ***** ^ not supported yet
  30. ***** ^ not supported yet
  31. 25 END cos;
  32. ***** ^ not supported yet
  33. 26
  34. 27
  35. 28 PROCEDURE entier( r: REAL) : INTEGER;
  36. 29 VAR
  37. 30 i : INTEGER;
  38. 31 BEGIN
  39. 32 i := TRUNC( r);
  40. ***** ^ undeclared identifier
  41. ***** ^ not supported yet
  42. 33 IF (r < 0.0) AND (r <> FLOAT( i)) THEN
  43. ***** ^ undeclared identifier
  44. ***** ^ not supported yet
  45. 34 DEC( i);
  46. ***** ^ undeclared identifier
  47. ***** ^ not supported yet
  48. 35 END;
  49. 36 RETURN i;
  50. 37 END entier;
  51. ***** ^ not supported yet
  52. 38
  53. 39
  54. 40 PROCEDURE exp( r: REAL) : REAL;
  55. 41 BEGIN
  56. 42 RETURN REAL( Exp( LONGREAL( r)));
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. 43 END exp;
  60. ***** ^ not supported yet
  61. 44
  62. 45
  63. 46 PROCEDURE ln( r: REAL) : REAL;
  64. 47 BEGIN
  65. 48 RETURN REAL( Log( LONGREAL( r)));
  66. ***** ^ not supported yet
  67. ***** ^ not supported yet
  68. 49 END ln;
  69. ***** ^ not supported yet
  70. 50
  71. 51
  72. 52 PROCEDURE real( i: INTEGER) : REAL;
  73. 53 BEGIN
  74. 54 RETURN REAL( i);
  75. ***** ^ not supported yet
  76. 55 END real;
  77. ***** ^ not supported yet
  78. 56
  79. 57
  80. 58 PROCEDURE sin( r:REAL) : REAL;
  81. 59 BEGIN
  82. 60 RETURN REAL( Sin( LONGREAL( r)));
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. 61 END sin;
  86. ***** ^ not supported yet
  87. 62
  88. 63
  89. 64 PROCEDURE sqrt( r:REAL) : REAL;
  90. 65 BEGIN
  91. 66 RETURN REAL( Sqrt( LONGREAL( r)));
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. 67 END sqrt;
  95. ***** ^ not supported yet
  96. 68
  97. 69
  98. 70 END MathLib0.
  99. ***** ^ not supported yet
  100. 28 errors