Hello,

Sorry for typo: both 4.3a and 4.2c are not working.
With studies I have done today it has been broken before 3.6.a

Yes the "do" is with an empty body. 
I don't know if it is correct to use empty body the definition is:

do ((variable init step) ...) (test expression ...) body

So for sure, we can use several "expression".

 In fact the part that fails come from the SLIB...


I have the same trouble with simple "(let loop ( ) )"  but I didn't have the 
time to make a testcase
I agree bigloo is great when compiling, but debugging in interpreted mode is 
from my side much more faster.


Thanks for your help.
Pierre



-----Original Message-----
From: bigloo-requ...@inria.fr [mailto:bigloo-requ...@inria.fr] On Behalf Of 
Sven Hartrumpf
Sent: Wednesday, April 27, 2016 4:20 PM
To: bigloo@inria.fr
Subject: Re: [bigloo] Do function fail in interpreted mode

Hi Pierre-Francois.

You wrote, 2016-04-25 16:49:
> Hello Manuel,
> 
> I am using the latest 4.3c

There is no such beast.
4.2c or 4.3a (alpha)?

> (I am switching from an old 3.1b ...)

Welcome back -
this switching is a worthwhile project, but expect some trouble ahead :-)

> and I face some issues so here is the first one:
> 
> 
> ;; (module test
> ;;         (main main))
> 
> ;; (define (main argv)
> ;;   (mytest "test"))
> 
> 
> (define (myprint v1 v2)
>   (print 'not-printed))
> 
> 
> (define (mytest var1)
>   (do ((i 0 (+ i 1)))
>       ((>=  (+  3 i) 5)
>        (print 'printed)
>        (myprint (print i) (print var1)) ;;myprint is not executed ??
>        ))
>   ;;If I remove the following print function the myprint works
>   (print var1) ;; var1 seems to have magically changed to 2
>   )

The do-loop looks fishy: the body is empty and several returning expressions 
after the test are unusual.
Do you mean?

(define (mytest var1)
  (do ((i 0 (+ i 1)))
      ((>= (+ 3 i) 5))
     (print 'printed)
     (myprint (print i) (print var1)))
  (print var1))

bigloo's main concern is the compiler, where it excels with its speed of 
resulting binaries.
The interpreter has some minor deficiencies, if I remember correctly.

Ciao
Sven

Reply via email to