[thelist] Looping Psuedocode
Tab Alleman
Tab.Alleman at MetroGuide.com
Thu Aug 28 10:59:29 CDT 2003
shortestpath wrote:
> Basically I want to see some Psuedocode that
> solves:
>
> from :: to ::
> Item A Item A
> Item A Item B
> Item A Item C
> Item B
> Item B
> Item B
> Item B
> Item C
> Item C
A generic looping solution I've used:
SET varOldValue = SomeValueThatCannotAppearInTheList
FOR EACH Item IN TheList
Set varNewValue = ThisItemValue
IF varNewValue <> varOldValue THEN
(This is a new item...write it or whatever)
Set varOldValue = varNewValue
END IF
NEXT Item
HTH,
Tab
More information about the thelist
mailing list