/[gcl]/gcl/ansi-tests/loop1.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/loop1.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by pfdietz, Mon Oct 28 04:50:59 2002 UTC revision 1.6 by pfdietz, Tue May 27 23:00:39 2003 UTC
# Line 224  Line 224 
224  (deftest loop.1.43  (deftest loop.1.43
225    (loop for x from 10 above 0 do nil finally (return x))    (loop for x from 10 above 0 do nil finally (return x))
226    1)    1)
 |#  
227    |#
228    
229    ;;; The arithmetic loop form says the types are numbers, not
230    ;;; reals, so arguably they should work on complexes (which are
231    ;;; numbers.)  Comparing these for termination could be problematic,
232    ;;; but a clause without termination should work just fine.
233    
234    (deftest loop.1.44
235      (loop for i from 1 to 5 for c from #c(0 1) collect c)
236      (#c(0 1) #c(1 1) #c(2 1) #c(3 1) #c(4 1)))
237    
238    (deftest loop.1.45
239      (loop for i from 1 to 5 for c from #c(0 1) by 2 collect c)
240      (#c(0 1) #c(2 1) #c(4 1) #c(6 1) #c(8 1)))
241    
242    (deftest loop.1.46
243      (loop for i from 1 to 5 for c downfrom #c(5 1) collect c)
244      (#c(5 1) #c(4 1) #c(3 1) #c(2 1) #c(1 1)))
245    
246    (deftest loop.1.47
247      (loop for i from 1 to 5 for c downfrom #c(10 1) by 2 collect c)
248      (#c(10 1) #c(8 1) #c(6 1) #c(4 1) #c(2 1)))
249    
250    (deftest loop.1.48
251      (loop for i from 1 to 5 for c upfrom #c(0 1) collect c)
252      (#c(0 1) #c(1 1) #c(2 1) #c(3 1) #c(4 1)))
253    
254    (deftest loop.1.49
255      (loop for i from 1 to 5 for c upfrom #c(0 1) by 2 collect c)
256      (#c(0 1) #c(2 1) #c(4 1) #c(6 1) #c(8 1)))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26