Quote:

Unbalanced quotes are trickier.



You got that right! It took fair though, lots of testing, and three code revisions before I was satisfied with how they were handled, especially quote chars in strings.

Thanks for the feedback. I struggled with the unbalanced paren thing for quite a while.. and in the end, decided not to write a KiX Interpreter in Kix, which is about where I'd need to go to resolve them. The "free format" of KiX can be both a blessing and a curse.

One thought was to log every instance. If parens were closed within, say, 5 lines it would be OK, otherwise reported as a warning. Another was to look at the $_PF value at the end of the script, and only then report every mismatched Paren line. But - what if you missed a closing paren on line 17 and an opening paren on line 239? It would be balanced, but not correct.

So - at this point - I generate the warning and turn processing over to the carbon-based analog computer between your ears. They are warnings, not errors, just for this reason.

If someone has a good algorithm for this (or even ideas), go ahead and post it!

BTW - for those of you that use my KGen UDF resolver/linker, this code is now embedded in it. You can download it from my web site - Products / Admin Toolchest / Kix Development.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D