My thoughts on the idea:
I imagine that parsing the command wouldn't be the difficult part (I've been able to pull that kind of thing off before). The difficult would be storing the data.
Let's assume every object can have x number of commands assigned to it. My gut reaction would be that that requires an array like this:
dim commands(65535,X)
But that means you will waste commands on control structures (Like while/wend). So perhaps you could split the X into Y and Z subsections such that X=Y*Z, making an array like so:
dim commands(65535,Y,Z)
Then use the first area as a means of getting start and finish conditions.
However, this would only work for loop structures with constant beginning and ending criteria (DO/LOOP, FOR/NEXT) and NOT ones in which the user can specify a condition to check (REPEAT/UNTIL, WHILE/ENDWHILE). You could work around this, but then you have to do a few things:
1) All variables MUST be part of an ARRAY (thus it will store the index number to check).
2) Parsing it out would then store the index number of the variable to check, the operation code, and the number to check against (this could be a discrete value or another variable index).
Such that the code would be something like
IF variable(varA) operation varB THEN...
Where the operation codes would be something like:
1.==
2.!=
3.<
4.>
5.<=
6.>=
7.=i (equals integer)
8.!=i (notEqual Integer)
9.<i (less than integer)
10.>i (and so on...)
11.<=i
12.>=i
Where all operation codes of 7+ use the second value as a value, rather than a variable index.
Just my thoughts. Don't know if you were soliciting ideas.
Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose