Updated the UDF today after further offline discussions.
Notable changes:
The UDF runs silently, and returns an array of warning info
The LMsg sub-function can now be passed the array returned by Sanity, along with an optional file name, and it will generate the informational messages
Sanity() now accepts either a filespec (as before) or a string containing all of the script text. This allows you to open the target file into a KixForms window and pass the entire file string for parsing. Since a simple string is passed either way, you must specify either mode 0 or mode 1 parameters for proper processing. I have some ideas for automating this, such as "If only 1 line it's a file spec, otherwise it's a data stream" but that's an update for another day.
One note about the Warnings array that's returned - Element 0 is always returned, and contains a summary of the number of lines processed, and the number of warnings. If the UBound of the returned array is 0, no warnings were generated.
Thanks for the feedback so far!
Glenn
PS - DAMN!! The board has truncated the code AGAIN.
I'll make it available for download on my web site. It will be embedded in a small demo script.
Edited by Glenn Barnas (2005-10-24 03:47 PM)
_________________________
Actually I
am a Rocket Scientist!