Scheduled Activities
version 8 by John Clemens
Section 2 - Utility functions - unindexed
The stored_preceding is a number that varies. The stored_preceding is 0.
[ 0: first activity this turn, 1 : some activity precedes, 2: same activity precedes]
To mark (E - activity) activities:
repeat through the Table of Scheduled Events:
if the SA_Event entry is E, change the SA_Similar entry to 1.
To unmark similar entries:
repeat through the Table of Scheduled Events:
change the SA_Similar entry to 0.
[ The next check is done to account for time advancements of more than one minute. ]
To check skipped events:
unless skipped events, rule succeeds;
while skipped events:
repeat through the Table of Scheduled Events in SA_Moment order:
if there is a SA_Target entry, carry out the SA_Event entry activity with the SA_Target entry;
otherwise carry out the SA_Event entry activity;
if a paragraph break is pending, say conditional paragraph break;
blank out the whole row.
To decide if skipped events:
repeat through the Table of Scheduled Events:
if there is a SA_Moment entry and the SA_Moment entry is before the time of day and 30 minutes after the SA_Moment entry is after the time of day, decide yes;
decide no.
To decide if (item - object) satisfies (collection - description): (- {collection}({item}) -).