1. V4.1.0 and doubles
- Posted by irv Jan 06, 2012
- 1471 views
The experimental version has difficulty passing double values to C routines. In interpreted mode, nothing seems to get there, and when compiled, I get the following:
irv@irv-desktop ~ $ ./euc /home/irv/demos/test8 Build directory: build-164569/ Translating code, pass: 1 2 3 4 5 6 7 8 9 10 generating Compiling with GCC Compiling 1% init-.c In file included from init-.c:2:0: main-.h:4224:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token main-.h:4225:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token ...repeated several times... init-.c: In function ‘init_literal’: init-.c:5987:25: error: ‘eudouble’ undeclared (first use in this function) init-.c:5987:25: note: each undeclared identifier is reported only once for each function it appears in init-.c:5987:34: error: expected ‘)’ before numeric constant ...repeats twice more... Couldn't compile file 'init-.c' Status: 256 Command: gcc -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/usr/share/euphoria -ffast-math init-.c
This affects all the EuGTK demos which use doubles, including all the Cairo functions.
2. Re: V4.1.0 and doubles
- Posted by mattlewis (admin) Jan 06, 2012
- 1443 views
The experimental version has difficulty passing double values to C routines. In interpreted mode, nothing seems to get there, and when compiled, I get the following:
init-.c:5987:25: error: ‘eudouble’ undeclared (first use in this function)
I think your translation process is using an old euphoria.h. Depending on whether you're using a 32 or 64 bit version of euphoria, eudouble is a typedef for "double" or "long double," respectively.
This affects all the EuGTK demos which use doubles, including all the Cairo functions.
I thought that double passing was working. Are you using a 32 or 64-bit version?
Matt
3. Re: V4.1.0 and doubles
- Posted by irv Jan 06, 2012
- 1430 views
I thought that double passing was working. Are you using a 32 or 64-bit version?
Matt
Testing with eubin-linux-32-2011-12-03.cafb2366afff.tar.gz downloaded this a.m.
The multiple-left-hand assignment works nicely :)
4. Re: V4.1.0 and doubles
- Posted by mattlewis (admin) Jan 06, 2012
- 1356 views
I thought that double passing was working. Are you using a 32 or 64-bit version?
Matt
Testing with eubin-linux-32-2011-12-03.cafb2366afff.tar.gz downloaded this a.m.
The multiple-left-hand assignment works nicely :)
Thanks, I've confirmed the double issue. You should upgrade to 64-bits...it works there.
Matt
5. Re: V4.1.0 and doubles
- Posted by irv Jan 06, 2012
- 1356 views
Oh, btw , what's the "don't care" symbol to use in left-hand assignment, as in {x,v}= value(...) where I don't care about x?
6. Re: V4.1.0 and doubles
- Posted by mattlewis (admin) Jan 06, 2012
- 1385 views
Oh, btw , what's the "don't care" symbol to use in left-hand assignment, as in {x,v}= value(...) where I don't care about x?
Question mark:
{?, v} = value(...)
Matt
7. Re: V4.1.0 and doubles
- Posted by mattlewis (admin) Jan 06, 2012
- 1353 views
The experimental version has difficulty passing double values to C routines.
I just pushed up a fix for this issue. Maybe I'll try to post new eubins over the weekend.
Matt