Repeat Through Actions

version 2 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - the Loops

    Section - repeat through all actions

    To repeat with (loopvar - nonexisting action-name variable) running through/thru all/every/each/-- the/-- action/actions begin -- end:
    (- {-allocate-storage:LoopingThruActions} ! {-advance-counter:LoopingThruActions} ! don't delete this comment; it actually still advances the counter, which is important because -->0 means something way different than -->1 or -->2
        I7_ST_LoopingThruActions-->{-counter:LoopingThruActions} = 1;
        for ( {loopvar} = ActionData-->((I7_ST_LoopingThruActions-->{-counter:LoopingThruActions}) + AD_ACTION)
            : (I7_ST_LoopingThruActions-->{-counter:LoopingThruActions}) <= ActionData-->0
            : I7_ST_LoopingThruActions-->{-counter:LoopingThruActions} = (I7_ST_LoopingThruActions-->{-counter:LoopingThruActions}) + AD_RECORD_SIZE
                , {loopvar} = ActionData-->(((I7_ST_LoopingThruActions-->{-counter:LoopingThruActions}) % ActionData-->0)+AD_ACTION)
        )
    -).