PageRenderTime 35ms CodeModel.GetById 18ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 1ms

/trunk/Examples/modula3/exception/example.h

#
C++ Header | 18 lines | 13 code | 4 blank | 1 comment | 0 complexity | 471934f0c96ee6b25a8315d4053bb9ac MD5 | raw file
 1/* File : example.h */
 2
 3enum error {OK, OVERFLOW, DIVISION_BY_ZERO, NEGATIVE_RADICAND, NEGATIVE_BASE};
 4typedef error errorstate;  /* just to separate the typemaps */
 5
 6error acc_add (double &x, double y);
 7error acc_sub (double &x, double y);
 8error acc_mul (double &x, double y);
 9error acc_div (double &x, double y);
10
11double op_add (double x, double y, errorstate &err);
12double op_sub (double x, double y, errorstate &err);
13double op_mul (double x, double y, errorstate &err);
14double op_div (double x, double y, errorstate &err);
15double op_sqrt (double x, errorstate &err);
16double op_pow (double x, double y, errorstate &err);
17
18double op_noexc (double x, double y);