Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: forall error

From: joel:neely:fedex at: 22-May-2001 11:02

Hey, Charles, Charles Wardell wrote:
> When I do a forall I get this error. Thanks in advance for your help.. > > Charlie > > ** Internal Error: Stack overflow > ** Near: not tail? get word > > get: func [myVar] [ > forall myDB [ > rec: first myDB > if rec/fType = myVar [ > remove myDB > ] > ] > ] >
If you have a minute, would you try this alternative? get: func [myVar /local walkDB] [ walkDB: myDB while [not tail? walkDB] [ rec: first walkDB either rec/fType = myVar [ remove walkDB ][ walkDB: next walkDB ] ] ] I don't have time to test it right now, but I suspect that your problem comes from mutating the same series that FORALL is trying to walk through. The only thing I'm doing different in the snippet above is explicitly managing the remove-or-step process. -jn-