I need the macro capability to simplify using xchars. Macros seem to basically work, but not robust, and adding double chars made spaghetti which needs fixing. I made a few passes at high speed testing with xchars, and it mostly works except strings do not fold properly in rectangles.
But interactive script is essential, and the Default error recovery has become robust. So loading up multiple loadables at a time should be done with a robust Default macro capability, simple, but error proof.
Struct mapping to args list
All the applets should use a standard struct set up to map and use args list:
struct * { char *, self; char * rect; char *string} MyCommand = args;
Or something like that, the pros know how to do this. Then on close of command:
*argc += sizeof(MyCommand)/4;
I don't use structures at this level, and it is painful because many errors are just that, fouling *argc. Protecting and using *argc is the thing that underpins the whole system. It is powerful because argc is exposed and sub systems are expected to manage it.
If you hit cntrl c (no vowels allowed) during a complex syntax, the console loop will kick you out of the syntax, set argc and args back to zeroed out, reset mode and ask for another line of input, in command mode.
Until you hit cntrl C, you remain in syntax mode unless you syntax engine change the return integer from CONTINUE to SUCCESS. Default does pass thru fine, I can leave it in Defaule, then invoke a macro any time:
MyMacro();
So, I have a robust console, cntrl c sets me to the beginning, but I can add a command to completely reinitialize easily enough.I want to be able to write while loops on the fly with simple expressions. I am mostly there and making macros robust is worth the next step.
No comments:
Post a Comment