Wednesday, January 2, 2019

How much args list can a snippet use?

MySnippet(int *argc,voiad * args[]) {

int base = *argc;

}

The snippet owns args from base to the semi colon in Default syntax.
 In console loop, the snippet can use args out to infinity.
/Console loop mode sets argc to zero, noting preserved in args list.

The argc requirements are unknown for other syntax engines. Since using args is mostly new, now is the time to standardize on semicolon for command line control

If the snippets calls the other snippets directly, not via Exec Command, then the two can create their own argc and args, be completely independent of syntax mode or default mode.  Cursor manager does this with xchars, calls directly.

The one catch is that any sub system can call ExecFile while in Default. That completely fouls the system, but works fine in console loop. This is the one major syntax error for console loop, until fixed.

I think I have this, the last major flow issue working, so all the macros and expressions and while loops will be simple adjustments.

So the package is defining and running macros without crashing, and I have to test for correctness.  The syntax-console hand off seems to work, semi colon terminators do their job. I have one page of Default syntax document in the links.  It should be mostly a few minor alignment fixes from now on, repaired as I use and test the system.

No comments: