1. V4.1.0 and doubles

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.

new topic     » topic index » view message » categorize

2. Re: V4.1.0 and doubles

irv said...

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.

irv said...

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: V4.1.0 and doubles

mattlewis said...

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 :)

new topic     » goto parent     » topic index » view message » categorize

4. Re: V4.1.0 and doubles

irv said...
mattlewis said...

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. smile

Matt

new topic     » goto parent     » topic index » view message » categorize

5. Re: V4.1.0 and doubles

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?

new topic     » goto parent     » topic index » view message » categorize

6. Re: V4.1.0 and doubles

irv said...

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: V4.1.0 and doubles

irv said...

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu