Interval.st
changeset 339 e8658d38abfb
parent 328 7b542c0bf1dd
child 379 5b5a130ccd09
--- a/Interval.st	Sat May 06 06:26:35 1995 +0200
+++ b/Interval.st	Mon May 08 05:31:14 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.13 1995-05-01 21:30:08 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.14 1995-05-08 03:29:37 claus Exp $
 '!
 
 !Interval class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.13 1995-05-01 21:30:08 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.14 1995-05-08 03:29:37 claus Exp $
 "
 !
 
@@ -53,6 +53,22 @@
     The interresting thing is that the elements are computed, not stored.
     For example, the interval (1 to:5) containes the elements (1 2 3 4 5) and
     (1 to:6 by:2) contains (1 3 5).
+
+    examples:
+
+	(1 to:10) do:[:i | Transcript showCr:i]
+
+      notice, that this is semantically equivalent to:
+
+	1 to:10 do:[:i | Transcript showCr:i]
+
+      however, the second is preferred, since loops using to:do: are
+      much faster and do not create temporary garbage objects. 
+      Therefore, Intervals are generally NOT used for this kind of loops.
+
+	(1 to:10) asArray  
+
+	(1 to:10 by:2) asOrderedCollection  
 "
 ! !
 
@@ -121,13 +137,15 @@
 !
 
 increment 
-    "same as #step; for ST-80 compatibility"
+    "alias for #step; for ST-80 compatibility"
 
     ^ step
 !
 
 step
-    "return the step increment of the range"
+    "return the step increment of the range.
+     OBSOLETE: 
+	Please use #increment for ST-80 compatibility."
 
     ^ step
 !