Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Displaying precompiler output in SRP EDITOR.EDT STATUS
Our precompiler outputs to the SRP_EDITOR.EDT_STATUS control ok, but gets overwritten by "compilation successful" message. Is there another way to send the info to the editor so that the output is displayed correctly at the completion of a compilation?
Comments
I am confused by the statement "so that the output is displayed correctly". What is incorrect about the output?
As a side question, would sending output to the Viewer (Shift+F7) help?
It appears that the compiler uses set_status and get_status to pass errors around. I don't know how the VNAV checker returns it's output. In srp-editor v2.6.1 I've found that the VNAV checker is a little hit and miss. Some times it returns results and some times it does not.
If the precompiler returns output via set_status then the compile process terminates before compiling and VNAV checking. The precompiler works more like the VNAV checker and returns warnings, which should not stop the compilation process.
Maybe one solution is that the editor clears the EDT_STATUS control when a compile is triggered, then appends output to the control, rather than replacing the contents, when the compilation process completes.
Cheers, M@
Besides, I'm pretty sure OI 10 will improve compiling performance since it will all be UTF-16.
len( allSourceCode) != getByteSize( allSourceCode)
test to check if there are any unicode characters in the precompiled source code (including Inserts). Hmm, how will that work? Won't it still have to parse UTF multi-btye characters, at least in existing source code??I suppose we could do length check, and perhaps that's something I'll play around with. Good idea.
I just tried an experiment! It seems that the compiler doesn't care about unicode characters, even in variable names. I compiled this simple unicode program in ANSI mode,
Subroutine Test_Unicode( void) Üñìçðďë = "Here is some Üñìçðďë" Call Msg( @window, Üñìçðďë) Return
and it displays properly when run in UTF-8 mode.Regarding the compilation, I suppose it makes sense that UTF-8 is preserved during compilation because strings don't have to be processed character-by-character. The compiler merely accepts all bytes between the quotes. Still, I can't help but think that there's an element of luck at play here. If a character is three bytes, for instance, and one of those bytes has the same code as the equal sign, I wonder if that would mess things up. Better yet, what if the last byte of the last character is a pipe. Would that fool the compiler into thinking it's a line continuation?