[Gambas-user] modifying an enumerated set during the loop
    B Bruen 
    bbruen at ...2308...
       
    Wed Jun 25 02:53:55 CEST 2014
    
    
  
On Wed, 25 Jun 2014 02:43:11 +0200
Benoît Minisini <gambas at ...1...> wrote:
> Le 25/06/2014 02:30, B Bruen a écrit :
> > I realise that modifying the enumerated set during a For Each loop is
(Cut)
> 
> No. An array is an object, and aTest a variable that owns a *reference* 
> to the array. If you set aTest to NULL, you just remove the reference, 
> not the array by itself, which is referenced by the FOR EACH instruction 
> until it ends.
> 
> -- 
> Benoît Minisini
> 
Ah, OK. So using 
  If Not aTest Then Break
during the loop appears to resolve the situation.
thanks
Bruce
-- 
B Bruen <bbruen at ...2308...>
    
    
More information about the User
mailing list