New Macro System

In this essay I shall outline the new plan for macros. If Dave agrees to it, then we shall both begin implementation and get it done that much sooner.

 

The first change will be that all macros and their indeces will be data typed. This multiplies the number macro codes by seven. Thus, we will have the following S-codes related to macros:

 

Macro Initiator (replaces MacroTerminator, name changed because it's always at the beginning of the macro, not the end.)

CharacterMacroDefinition#1 - #8. This corresponds to the earlier Macro1Definition, but differs in two respects. First, it is now data typed, and second, I have decided to increase the number of available macro slots to eight for each dataype.

ThingMacroDefinition#1 - #8. Same as above, for Thing data type.

VerbMacroDefinition#1 - #8. Same as above, for Verb data type.

EventMacroDefinition#1 - #8. Same as above, for Event data type.

StageMacroDefinition#1 - #8. Same as above, for Stage data type.

NumberMacroDefinition#1 - #8. Same as above, for Number data type.

BooleanMacroDefinition#1 - #8. Same as above, for Boolean data type.

 

CharacterMacroCall#1 - #8. This is the call of the macro appearing inside the macro-using function (e.g. PickBestCharacter).

ThingMacroCall#1 - #8. Same as above, for Thing data type.

VerbMacroCall#1 - #8. Same as above, for Verb data type.

EventMacroCall#1 - #8. Same as above, for Event data type.

StageMacroCall#1 - #8. Same as above, for Stage data type.

NumberMacroCall#1 - #8. Same as above, for Number data type.

BooleanMacroCall#1 - #8. Same as above, for Boolean data type.

 

CharacterMacroIndex. This is the special S-Code indicating a substitution of the loop index for that macro-using function.

ThingMacroIndex. Same as above, for Thing data type.

ThingMacroIndex. Same as above, for Thing data type.

VerbMacroIndex. Same as above, for Verb data type.

EventMacroIndex. Same as above, for Event data type.

StageMacroIndex. Same as above, for Stage data type.

 

Note that there are no Macro indeces for data types Number or Boolean.

This system will consume a total of 119 S-code slots; the old system required 9.

Dave: for discussion and approval tomorrow morning.