Diff of /main/trunk/interpreter/RexxClasses/CoreClasses.orx [r8463] .. [r8464]  Maximize  Restore

  Switch to side-by-side view

--- a/main/trunk/interpreter/RexxClasses/CoreClasses.orx
+++ b/main/trunk/interpreter/RexxClasses/CoreClasses.orx
@@ -2010,6 +2010,18 @@
   forward class (super) continue array (item)   -- allow the superclass to handle adding the item
   return ret                      -- return removed item
 
+-- check to see if we need to remove an item before appending.
+::METHOD append
+  expose size
+  use strict arg item
+
+  if size=0 then return .nil  -- size is 0, do not process!
+
+  if self~items >= size then
+     ret = self~pull           -- if we've gone over the size, remove this
+
+  forward class(super) -- allow the superclass to handle adding the item
+
 ::METHOD section
   expose size
   use strict arg index, count = (size)   -- the default is to return everything.  This essentially becomes a rotate

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks