On Fri, Dec 12, 2008 at 11:26 AM, Steven Taylor <[email protected]> wrote: > a simple example. > > 1 > 2 > 3 <-- FSM refers to back to entry 1 > 4 > 5 > ... > FSM steps forward > ... > 1 > 2 > 3 > 4 <-- FSM refers to back to entry 2 > 5 > > My reading of the J FSM is that it can only refer to the current row. I > hope I'm wrong... but perhaps sometimes you just have to have a loop.
J's sequential machine determines its next state based on its current state and its current item of data. Information about previous items of data are represented in its current state. When you use the ;: dyad, the design of its states and its transitions is up to you. That said, this is still not a full description of a problem. For example, hypothetically speaking you might do something like what you describe in several passes -- one pass would do state transitions when they happen (obtaiing a trace of these states) then you could shift the state information into the form you need it in and parse your data based on this shifted representation of state. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
