Project: | Proparse Project |
Component: | Code |
Category: | bug report |
Priority: | normal |
Assigned: | Unassigned |
Status: | active |
When trim is used in the expression in a preprocessor directive parsing crashes with an unknown exception.
Sample code:
1.p:
{c:\temp\1.i " "}
1.i:
&if trim("{1}") = ""
&then
find first _user no-lock no-error.
&endif
The problem is in passing an "empty" unnamed preprocessor. In the example when you delete the empty preprocessor in 1.p it parses just fine. I know the trim in 1.i is not necessary, if I remove that it parses just fine. If I change "trim" to "string" in 1.i it parses just fine.
A problem may arise when there is in fact a preprocessor {2} and {1} should be passed "empty".
So workarounds are available, but this is existing code being parsed.
Comments
#1
Hi Niek, thank you for the bug report. I will take a look next time I'm working on the parser.