Thank you Lonkero, sealeopard and Ruud for your suggestions. I finally managed to make my scripts run. The short essence is: I enthusiastically misused the pretokenization feature. My fault, sorry.

And now the details: I changed my code to enable switching between plain text/pretokenized script variants without editing code. I defined the desired suffix on the command line at startup:

KIX32_540rc1.EXE pre\foo.kix dep\bar.kix post\baz.kix $SUFFIX=".kx"

The CALLs are built like:

call 'sub\whatever' + $suffix

Now I could alternativly run both script variants plain/tokenized only by changing the command line. The plain text version worked perfectly. This was no surprise, as it worked before with KIX 4.1x to 4.2x. The pretokenized variant terminated as described above. Since I didn't change code to switch between variants this proves the code to be syntactically (unmatched quotes) and structurally (variable scope boundaries) sane. Obviously, there was something specifically wrong with the tokenization.

Thinking about INCLUDE and its implications for scope of variables, I finally asked myself "How does a pretokenized script know about GLOBAL variables defined by other scripts run before it ? How does it handle references to unknown variables ?". I'm still thinking about how it works, but in my case it just doesn't know and that makes it crash.

I use some scripts do do several maintenance tasks during development (backup older versions of edited files, prettifying, upload of touched files to the replication directory, etc.). Think of it as a "makefile". I added one command to freshly pretokenize touched files - but, and this is the flaw: each file is handled parted from the ohers, like:

KIX32_540rc1.EXE pre\foo.kix /t
KIX32_540rc1.EXE dep\bar.kix /t
KIX32_540rc1.EXE post\baz.kix /t

Poor kaz.kx, how should it handle references to global Vars defined in foo.kx and bar.kx ? I did a complete coherent build using a veeeery long command line:

KIX32_540rc1.EXE pre\foo.kix dep\bar.kix post\baz.kix .... etc ... /t

And now it works fine. Obviously, the pretokenized files undermine the "explicit" directive. Crossreferences to variables which are not available during the pretokenization run are not warned about. They just lead to unexpected behaviour. Sorry that I missed to recognize this earlier and to annoy you for my pilot error. On the other hand, this effect is a major drawback ...

Regarding the INCLUDE suggestions, I don't think they fit to my script structures. My approach uses distinct and mostly independent sub-scripts, which can be glued together by a calling script. Local variables do not interfere between thes sub-scripts. Using INCLUDE and pretokenizing the whole bunch naturally solves the problem of unresolved references, but makes the several sub-scripts act in one variable scope. Right ? This undermines my rigid script boundary policy.

I can chatter endless about this stuff, but I think I should stop my verbose babble now ...

Can you give me some pointers to technical detail documents about the pretokenization feature? How are references to external variables handeled? What about scope of variables in INCLUDEd scripts?

I'm still courious about it.

Greetings

OldFart