Event Chains

version 1 by William S Martin

  • Home page
  • Complete text



  • Version 1 of Event Chains by William S Martin begins here.

    Checker rules is a rulebook.

    Toggle rules is a rulebook.

    To step through chain (current table - a table name), terminating:
        let N be the number of filled rows in the current table;
        let K be 0;
        repeat through the current table:
            increment K;
            unless N is K and not terminating:
                if there is checker entry:
                    follow the checker entry;
                    if rule succeeded:
                        blank out the whole row;
                        next;
                    else if rule failed:
                        if there is a subtable entry:
                            step through chain subtable entry;
                            break;
                        if there is a reply entry:
                            say the reply entry;
                            say paragraph break;
                        if there is a toggle entry:
                            follow the toggle entry;
                            if the rule succeeded:
                                blank out the toggle entry;
                        break;
                    else:
                        next;
                else:
                    if there is a subtable entry:
                        step through chain subtable entry;
                        break;
                    if there is a reply entry:
                        say the reply entry;
                        say paragraph break;
                    if there is a toggle entry:
                        follow the toggle entry;
                        if rule succeeded:
                            blank out the toggle entry;
                    blank out the whole row;
                    break;
            else:
                if there is a subtable entry:
                    step through chain subtable entry;
                    break;
                if there is a reply entry:
                    say the reply entry;
                    say paragraph break;
                if there is a toggle entry:
                    follow the toggle entry;
                    if rule succeeded:
                        blank out the toggle entry;
                break.

    Table of Null Chain
    checker  toggle  subtable  reply  
    a rule  a rule  a table name  a text  


    Event Chains ends here.