Repeat Through Actions

version 2 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - asking if an action-name is involved with a particular stored action or kind-of-action

    Section - if stored actions or kinds of action involve the action-name

    [ if this condition looks a bit funny, know that it ensures calling RestoreActionName() even if short-circuit evaluation is used by the Inform optimizer ]
    To decide whether (C - a condition) involves/involve (acn - an action-name):
    (- ((SaveActionName({acn}) && {C} && RestoreActionName()) || (~~RestoreActionName())) -).

    Include (- Global save_action_for_cond; -) after "Definitions.i6t".

    Include (-
    [ SaveActionName acn; save_action_for_cond = action; action = acn; rtrue; ];
    [ RestoreActionName; action = save_action_for_cond; rtrue; ];
    -).

    [To debug I6-action-saving: (- print "(", (SayActionName) action, ") "; -).]