/[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.1 by pfdietz, Sat Oct 26 02:42:26 2002 UTC revision 1.2 by pfdietz, Sat Oct 26 18:29:48 2002 UTC
# Line 95  Line 95 
95            collect (progn (incf a) (incf b 2) (incf c 3) x)))            collect (progn (incf a) (incf b 2) (incf c 3) x)))
96    (0 1 2 3 4 5))    (0 1 2 3 4 5))
97    
98    (deftest loop.1.21
99      (loop for x from 0 to 5 by 1/2 collect x)
100      (0 1/2 1 3/2 2 5/2 3 7/2 4 9/2 5))
101    
102    (deftest loop.1.22
103      (loop for x from 1 below 5 collect x)
104      (1 2 3 4))
105    
     
106    (deftest loop.1.23
107      (loop for x from 1 below 5.01 collect x)
108      (1 2 3 4 5))
109    
110    (deftest loop.1.24
111      (loop for x below 5 from 2 collect x)
112      (2 3 4))
113    
114    (deftest loop.1.25
115      (loop for x from 10 above 4 collect x)
116      (10 9 8 7 6 5))
117    
118    (deftest loop.1.26
119      (loop for x from 14 above 6 by 2 collect x)
120      (14 12 10 8))
121    
122    (deftest loop.1.27
123      (loop for x above 6 from 14 by 2 collect x)
124      (14 12 10 8))
125    
126    (deftest loop.1.28
127      (loop for x downfrom 16 above 7 by 3 collect x)
128      (16 13 10))
129    
130    (deftest loop.1.29
131      (let (a b c (i 0))
132        (values
133         (loop for x from (progn (setq a (incf i)) 0)
134               below (progn (setq b (incf i)) 9)
135               by (progn (setq c (incf i)) 2)
136               collect x)
137         a b c i))
138      (0 2 4 6 8)
139      1 2 3 3)
140    
141    (deftest loop.1.30
142      (let (a b c (i 0))
143        (values
144         (loop for x from (progn (setq a (incf i)) 0)
145               by (progn (setq c (incf i)) 2)
146               below (progn (setq b (incf i)) 9)
147               collect x)
148         a b c i))
149      (0 2 4 6 8)
150      1 3 2 3)
151    
152    (deftest loop.1.31
153      (let (a b c (i 0))
154        (values
155         (loop for x
156               below (progn (setq b (incf i)) 9)
157               by (progn (setq c (incf i)) 2)
158               from (progn (setq a (incf i)) 0)
159               collect x)
160         a b c i))
161      (0 2 4 6 8)
162      3 1 2 3)
163    
164    (deftest loop.1.32
165      (let (a b c (i 0))
166        (values
167         (loop for x
168               by (progn (setq c (incf i)) 2)
169               below (progn (setq b (incf i)) 9)
170               from (progn (setq a (incf i)) 0)
171               collect x)
172         a b c i))
173      (0 2 4 6 8)
174      3 2 1 3)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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