to the appropiate method instead of prefixing `as_'.
* src/complex/misc/cl_N_as.cc (cl_N_As): Likewise.
* src/real/misc/cl_R_as.cc (cl_R_As): Likewise.
* src/rational/misc/cl_RA_as.cc (cl_RA_As): Likewise.
* src/integer/misc/cl_I_as.cc (cl_I_As): Likewise.
* src/float/misc/cl_F_as.cc (cl_F_As): Likewise.
* src/float/sfloat/misc/cl_SF_as.cc (cl_SF_As): Likewise.
* src/float/lfloat/misc/cl_LF_as.cc (cl_LF_As): Likewise.
* src/float/ffloat/misc/cl_FF_as.cc (cl_FF_As): Likewise.
* src/float/dfloat/misc/cl_DF_as.cc (cl_DF_As): Likewise.
+2000-09-05 Richard Kreckel <kreckel@ginac.de>
+
+ * include/cln/number.h (As): Fix it in namespace by suffixing `_As'
+ to the appropiate method instead of prefixing `as_'.
+ * src/complex/misc/cl_N_as.cc (cl_N_As): Likewise.
+ * src/real/misc/cl_R_as.cc (cl_R_As): Likewise.
+ * src/rational/misc/cl_RA_as.cc (cl_RA_As): Likewise.
+ * src/integer/misc/cl_I_as.cc (cl_I_As): Likewise.
+ * src/float/misc/cl_F_as.cc (cl_F_As): Likewise.
+ * src/float/sfloat/misc/cl_SF_as.cc (cl_SF_As): Likewise.
+ * src/float/lfloat/misc/cl_LF_as.cc (cl_LF_As): Likewise.
+ * src/float/ffloat/misc/cl_FF_as.cc (cl_FF_As): Likewise.
+ * src/float/dfloat/misc/cl_DF_as.cc (cl_DF_As): Likewise.
+
2000-09-05 Richard Kreckel <kreckel@ginac.de>
* src/complex/transcendental/cl_C_expt_C.cc (expt): fix logic for
// As(cl_I)(x) returns x as a cl_I. It first checks that x is a cl_I
// and then returns it without change of representation.
#if 0 // no debug information
- #define As(type) as_##type
+ #define As(type) type##_As
#define CL_DEFINE_AS_CONVERSION(_class_) \
- extern const _class_& as_##_class_ (const cl_number& x); \
- inline const _class_& as_##_class_ (const _class_& x) { return x; }
+ extern const _class_& _class_##_As (const cl_number& x); \
+ inline const _class_& _class_##_As (const _class_& x) { return x; }
#else // Line number information for ease of debugging.
- #define As(type) as_##type cl_as_aux
+ #define As(type) type##_As cl_as_aux
#define cl_as_aux(expr) (expr,__FILE__,__LINE__)
#define CL_DEFINE_AS_CONVERSION(_class_) \
- extern const _class_& as_##_class_ (const cl_number& x, const char * filename, int line); \
- inline const _class_& as_##_class_ (const _class_& x, const char * filename, int line) { (void)filename; (void)line; return x; }
+ extern const _class_& _class_##_As (const cl_number& x, const char * filename, int line); \
+ inline const _class_& _class_##_As (const _class_& x, const char * filename, int line) { (void)filename; (void)line; return x; }
#endif
// Mutable(type,x);
-// as_cl_N().
+// cl_N_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_N& as_cl_N (const cl_number& x, const char * filename, int line)
+const cl_N& cl_N_As (const cl_number& x, const char * filename, int line)
{
if (cl_N_p(x)) {
DeclareType(cl_N,x);
-// as_cl_DF().
+// cl_DF_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_DF& as_cl_DF (const cl_number& x, const char * filename, int line)
+const cl_DF& cl_DF_As (const cl_number& x, const char * filename, int line)
{
if (cl_DF_p(x)) {
DeclareType(cl_DF,x);
-// as_cl_FF().
+// cl_FF_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_FF& as_cl_FF (const cl_number& x, const char * filename, int line)
+const cl_FF& cl_FF_As (const cl_number& x, const char * filename, int line)
{
if (cl_FF_p(x)) {
DeclareType(cl_FF,x);
-// as_cl_LF().
+// cl_LF_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_LF& as_cl_LF (const cl_number& x, const char * filename, int line)
+const cl_LF& cl_LF_As (const cl_number& x, const char * filename, int line)
{
if (cl_LF_p(x)) {
DeclareType(cl_LF,x);
-// as_cl_F().
+// cl_F_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_F& as_cl_F (const cl_number& x, const char * filename, int line)
+const cl_F& cl_F_As (const cl_number& x, const char * filename, int line)
{
if (cl_F_p(x)) {
DeclareType(cl_F,x);
-// as_cl_SF().
+// cl_SF_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_SF& as_cl_SF (const cl_number& x, const char * filename, int line)
+const cl_SF& cl_SF_As (const cl_number& x, const char * filename, int line)
{
if (cl_SF_p(x)) {
DeclareType(cl_SF,x);
-// as_cl_I().
+// cl_I_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_I& as_cl_I (const cl_number& x, const char * filename, int line)
+const cl_I& cl_I_As (const cl_number& x, const char * filename, int line)
{
if (cl_I_p(x)) {
DeclareType(cl_I,x);
-// as_cl_RA().
+// cl_RA_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_RA& as_cl_RA (const cl_number& x, const char * filename, int line)
+const cl_RA& cl_RA_As (const cl_number& x, const char * filename, int line)
{
if (cl_RA_p(x)) {
DeclareType(cl_RA,x);
-// as_cl_R().
+// cl_R_As().
// General includes.
#include "cl_sysdep.h"
return cl_false;
}
-const cl_R& as_cl_R (const cl_number& x, const char * filename, int line)
+const cl_R& cl_R_As (const cl_number& x, const char * filename, int line)
{
if (cl_R_p(x)) {
DeclareType(cl_R,x);