Hi again: Can be overloaded the + and - operators to compile these silly lines: cl_F a,b; a=1*b; a=1/b; and some like these? -- *************************************************************************** * Dr. Isidro Cachadiña Gutiérrez * * Departamento de Física * * Facultad de Ciencias * * Universidad de Extremadura * * 06071 Badajoz ( SPAIN ) * * email: icacha@unex.es * * Teléfono: +34 924 289 300 Ext. 6826 Fax: +34 924 289 651 * *************************************************************************** * Usuario Linux: 8569 * * Para clave pública GnuPG: http://onsager.unex.es/firma.pub.asc * ***************************************************************************
On Mon, 13 Dec 2004, Isidro [iso-8859-15] Cachadiña Gutiérrez wrote:
Hi again:
Can be overloaded the + and - operators to compile these silly lines:
cl_F a,b;
a=1*b; a=1/b;
and some like these?
Are you having a good time with that stuff you are smoking? Pay attention! We've gone through this before, if you care to remember. Just look here: <http://thep.physik.uni-mainz.de/pipermail/cln-list/2004-November/000042.html> Saludos -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
El Martes, 14 de Diciembre de 2004 00:48, Richard B. Kreckel escribió:
On Mon, 13 Dec 2004, Isidro [iso-8859-15] Cachadiña Gutiérrez wrote:
Hi again:
Can be overloaded the + and - operators to compile these silly lines:
cl_F a,b;
a=1*b; a=1/b;
and some like these?
Are you having a good time with that stuff you are smoking? Pay attention!
We've gone through this before, if you care to remember. Just look here:
Yes, you sent a patch to this maillist that only affects to files in <cln/...> then I applyed your patch in /usr/include/cln/* and things like 1+a works fine but not the above example . Well I send you a program to cut and compile. If works for you then I'll recompile the cvs source and try. ----------------------------- cut and compile -------------------------- #include <cln/float.h> using namespace cln; int main(int argc, char **argv) { cl_F a; a=1/a; a=1*a; } -------------------------------------------------------------------------- test.C: En function `int main(int, char**)': test.C:7: error: no match for 'operator=' in 'a = cln::operator/(int, const cln::cl_F&)((&a))' /usr/include/cln/float_class.h:40: error: candidates are: cln::cl_F& cln::cl_F::operator=(const cln::cl_F&) /usr/include/cln/float_class.h:47: error: cln::cl_F& cln::cl_F::operator=(float) /usr/include/cln/float_class.h:48: error: cln::cl_F& cln::cl_F::operator=(double) test.C:8: error: no match for 'operator=' in 'a = cln::operator*(int, const cln::cl_F&)((&a))' /usr/include/cln/float_class.h:40: error: candidates are: cln::cl_F& cln::cl_F::operator=(const cln::cl_F&) /usr/include/cln/float_class.h:47: error: cln::cl_F& cln::cl_F::operator=(float) /usr/include/cln/float_class.h:48: error: cln::cl_F& cln::cl_F::operator=(double) make: *** [test.o] Error 1 --------------------------------------------------------------------------- Bye. -- *************************************************************************** * Dr. Isidro Cachadiña Gutiérrez * * Departamento de Física * * Facultad de Ciencias * * Universidad de Extremadura * * 06071 Badajoz ( SPAIN ) * * email: icacha@unex.es * * Teléfono: +34 924 289 300 Ext. 6826 Fax: +34 924 289 651 * *************************************************************************** * Usuario Linux: 8569 * * Para clave pública GnuPG: http://onsager.unex.es/firma.pub.asc * ***************************************************************************
El Martes, 14 de Diciembre de 2004 00:48, Richard B. Kreckel escribió:
On Mon, 13 Dec 2004, Isidro [iso-8859-15] Cachadiña Gutiérrez wrote:
Hi again:
Can be overloaded the + and - operators to compile these silly lines:
cl_F a,b;
a=1*b; a=1/b;
and some like these?
Are you having a good time with that stuff you are smoking? Pay attention!
I'm sure that your stuff is better than mine. ;-) . I have justs reread the patch and there are lines like ... inline const cl_R operator* (const cl_F& x, const int y) { return x * cl_I(y); } and should be.. inline const cl_F operator* (const cl_F& x, const int y) { return x * cl_I(y); } Then the patch have to been repatched...
We've gone through this before, if you care to remember. Just look here: <http://thep.physik.uni-mainz.de/pipermail/cln-list/2004-November/000042.ht ml>
Saludos
Hasta otra. -- *************************************************************************** * Dr. Isidro Cachadiña Gutiérrez * * Departamento de Física * * Facultad de Ciencias * * Universidad de Extremadura * * 06071 Badajoz ( SPAIN ) * * email: icacha@unex.es * * Teléfono: +34 924 289 300 Ext. 6826 Fax: +34 924 289 651 * *************************************************************************** * Usuario Linux: 8569 * * Para clave pública GnuPG: http://onsager.unex.es/firma.pub.asc * ***************************************************************************
On Tue, 14 Dec 2004, Isidro Cachadiña Gutiérrez wrote:
Are you having a good time with that stuff you are smoking? Pay attention!
I'm sure that your stuff is better than mine. ;-) .
You betcha.
I have justs reread the patch and there are lines like ...
inline const cl_R operator* (const cl_F& x, const int y) { return x * cl_I(y); }
and should be..
inline const cl_F operator* (const cl_F& x, const int y) { return x * cl_I(y); }
Nope. Look at this function that's already been there before that patch: inline const cl_R operator* (const cl_F& x, const cl_I& y) { extern const cl_R cl_F_I_mul (const cl_F&, const cl_I&); return cl_F_I_mul(x,y); } I leave it as an exercise to find out why the return value is cl_R. (If you wish to cheat: just look up cl_F_I_mul(const cl_F&, const cl_I&).) Suerte -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
participants (2)
-
Isidro Cachadiña Gutiérrez
-
Richard B. Kreckel