Details of Data Typing

 

I have wrapped up substitution variables and so now it's time to confront data typing. How will I implement this?

 

First I have to declare the data types. Each operator in the Master Globals file must be declared as to its type. It must also have its arguements' types declared. What will this look like? Here's a current format:

 

long Affection[CHARACTERCOUNT]; //* D 2, WhoFeels, ForWhom,

 

We'd have to insert information to the effect that Affection itself yields a Number as its type and requires that each of its two arguements be of type Person. So how about this format:

 

long Affection[CHARACTERCOUNT]; //* D:Number, 2, WhoFeels:Person, ForWhom:Person,

 

So let's try this out with some other formats:

 

long ThisActor; //* E:Person, 0,

 

long AbsoluteValue(long SignedValue); //* F:Number, General, 1, SignedValue:Number,

 

void DecrementFanOut(long); //* F Admin, 1, WhichTellEvent:Number,

 

long FindSequence(long, long, long); //* F:Event, History, 2, LatestEvent:Event, HowFarBack:Number,

 

long ThisSubject; //* D:Person 0,

 

I suppose that this will work. So the next question is, how will typing be handled with substitute variables? I see two solutions: carry the typing through the substitute variables, and dispense with it completely in this case. This would make substitute variables a kind of typecasting or type-negating feature.

 

In the former case, we'd need a parallel array for the substitute variables that keeps track of the currently assigned type for the substitute variable. It wouldn't be so hard to implement. I spose so.

 

Let's talk about the use of color now. I'd love to assign colors to each type, although this might make the screen look a little busy. There's an even nastier problem: I can't get colors into submenus. So the display might show colors but the menus wouldn't. Of course, the point is moot &emdash; anything of the wrong color would be greyed out anyway. So what's the point of splashing all those colors around on the screen? What is gained?