in reply to Unique Array Data

My objective is to retain any unique order after every Topology Entry. ... It works great except for the fact that I need to push Topology on the array just before IPClassB, because this isn't the same pattern as the previous path beggining with the root Topology.

Huh? What does "same pattern" have to do with retaining unique order after each "Topology" entry? Please say more about what "unique order" you're trying to maintain. Perhaps a more extensive set of examples (data, not code) might help.

Replies are listed 'Best First'.
Re: Re: Unique Array Data
by The_Rev (Acolyte) on Mar 07, 2002 at 04:40 UTC
    My goal is to keep any data from 'each' Topology entry forward that is unique from the one prior, and if the element directly after the Topology entry is unique from the one prior, I need to retain an entry for Topology....whoo that was a mouthful. I hope I made that clear. Thanks dws
      My goal is to keep any data from 'each' Topology entry forward that is unique from the one prior, and if the element directly after the Topology entry is unique from the one prior, I need to retain an entry for Topology.

      Does this mean that you're considering each Topology "block" pairwise, and that "uniqueness" only applies to the previous pair? If so, why are you discarding some (but not all) Topology entries? Or are you discarding every alternate Topology (by way of alternation)?

        I am considering the data that directly proceeds Topology as Unique ie(IPClassA, and IPClassB,) For example, If I had two sequences that contained Topology IPClassA, and the third element of each sequence was different I would look at that element.
        Uniqueness would be anything that starts with a capital letter from Topology to the next Topology and if the node differs from the previous one. I would like to retain the one prior, for example if I have:
        Topology IPClassA subnet_address=0 Topology IPClassA Device model_name=1 Topology IPClassB Device model_name=2 Topology IPClassB Device
        I would like to end up with:
        Topology IPClassA subnet_address=0 Device model_name=1 Topology IPClassB Device model_name=2 Device
      The Foo Array after should look like this:
      Topology IPClassA subnet_address=0 Device model_name=1 Topology IPClassB Device model_name=2
      with Topology preceeding IPClassB