| www.delorie.com/gnu/docs/smalltalk/gst_75.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Smalltalk at: #i put: (Interval from: 5 to: 10) ! i printNl ! i do: [:x | x printNl] ! |
As with the integer loops, the Interval class can also represent steps greater than 1. It is done much like it was for our numeric loop above:
i := (Interval from: 5 to: 10 by: 2) i printNl ! i do: [:x| x printNl] ! |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |