[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Nested progs and return with GCL-2.7.0
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Nested progs and return with GCL-2.7.0 |
Date: |
Mon, 04 Dec 2006 14:08:57 -0500 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory ōmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI) |
Greetings, and thank you so much for this very helpful bug report!
Should be fixed now. Please let me know if problems persist.
Take care,
=============================================================================
Hello,
With GCL checked out today (2.7.0 CLtL1 build) the following code never
returns "string processed" when it is compiled :
(defun test (str i)
(prog (|maxIndex| k)
(setq |maxIndex| (- (length str) 1))
(return (progn
(setq k
(or
(prog (#1=#:G550524)
(setq #1# nil)
(return
(do ((#2=#:G550531 nil #1#) (j i (+ j 1)))
((or #2# (> j |maxIndex|)) #1#)
(if (cond
((equal (elt str j) #\Space)
(setq #1# (or #1# j))))
(return #1#)))))
(return "string processed")))
(print "work with k")
k))))
The code (automatically generated), basically, finds the index (greater
than i) of a \#Space in a string.
Test it with :
[99]> (test "hello and bye" 10)
"string processed"
[100]> (test "hello and bye" 6)
"work with k"
9
Greg
=============================================================================
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah