Do function fail in interpreted mode

"Ollagnon, Pierre-Francois" <[email protected]>
Newsgroups gmane.lisp.scheme.bigloo
Message-ID <AC02FE2989D7094784CAB7324190BFBF06773F29@EU-MBX-01.mgc.mentorg.com>
Hello Manuel,

I am using the latest 4.3c (I am switching from an old 3.1b ...) 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
  )

;; Trace When compiled
;; printed
;; 2
;; test
;; not-printed
;; test

;;Trace when not compiled:
;; printed
;; 2
;; test
;; 2
;; 2


Regards,
Pierre-Francois
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.