Re: Oh, I may have a big problem with Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 24 Dec 2000, at 17:26, George Henry wrote:

> If I build a deeply-nested data structure of arbitrary size, say for example a
> tree:
>
> (view using a fixed font)
> a
> b       c
> e   f   g   h
> i j k l m n o p
> qrstuvwxyz123456
>
> where z is root[RIGHTCHILD][LEFTCHILD][LEFTCHILD][RIGHTCHILD][VALUE] (follow
> that?), then is there any way of modifying z without hardcoding that
> particular expression? There does not appear to be a way of "aliasing" that
> nasty expression, or saving some sort of bookmark to z that I can use later to
> access it.
>
> The word "pointer" springs to mind, but maybe there is another way.
>
> Just as an example, show me a routine, for an arbitrary tree represented by
> nested sequences, to change all instances of "g" to "w". Suppose the tree is
> built at runtime by user action, and has gaps in it....
>
> Then, what if the user bookmarks nodes in the tree? Must I save the bookmark
> information in the nodes, to be able to identify it later? If I do this, it
> seems that searching the tree for bookmarks would be incredibly inefficient
> and ugly, compared to having external bookmarks.

Did you look at Jiri's associated lists code?

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu