RE: Strange behavior in sequence handling
- Posted by tacitus <indorlaw at zdnetonebox.com> May 07, 2001
- 468 views
it gives an interesting insight into the underlying implementation of euphoria. in the first assignment of L (L[1] = L), the values of L are all integers and assigned (apparently) by value. in the second assignment of L (L[1][1] = L), the right side is a nested sequence, which euphoria assigns by a pointer to the sequence structure (in this case, itself). no problem with the actual assignment (no error), but when you try to access the contents of the first element, it points back to its own structure recursively in an infinite loop. so it's a feature after all - recursive variables, to go with types that act like functions! euphoria has hidden powers. cheers all tacitus sephiroth _ wrote: > interesting...:) i inserted a few print statements(for each assignment > to L after the "weird" comment) and got this: > > {97,98,122} > {{97,98,122},98,122} > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ > CauseWay DOS Extender v3.45 Copyright 1992-99 Michael Devore. > blah blah blah... > >