Especially for long scripts, it would be helpful to have line numbers in code editor and enhancing syntax error messages by references to the line numbers where problems occurred.
Some of my scripts are about 400 lines and it is very difficult to find bugs there if error messages say only "invalid Primary" or "invalid Expr".
Line numbers and better syntax error messages
Moderator: Moderators
Yes, the error messages are a mess. I try to fix them in the compiler whenever I get one of those myself. At least there does not seem to be any crashes left, previously you could get "access violation" on certain syntax errors.
Line numbers are a good idea, should be easy to add a label that shows the current line and column.
Line numbers are a good idea, should be easy to add a label that shows the current line and column.
Hi Ville,
could you please add line/column also to the "Assignment destination must be variable or array" syntax error message? I wrote a longer script this morning and could not find the place where the problem was. After many commenting and uncommenting of code blocks, I finally found that instead of == I used = for comparison.
could you please add line/column also to the "Assignment destination must be variable or array" syntax error message? I wrote a longer script this morning and could not find the place where the problem was. After many commenting and uncommenting of code blocks, I finally found that instead of == I used = for comparison.
One that always confuses me is the error that appears when a Condition component tries to process something like this:
it returns a scary sounding
Assertion failure (C:\Data\Delphi32\ZzDC_Public\tools\ZDesigner\Compiler\Zc.PAS, line 1835) (line: 4, col: 16) (what does it mean?)
Code: Select all
return ((A == 99) (B == 66));
//originally there was a "&&" (or "||") between the two conditions,
//but it got lost during editing...
Assertion failure (C:\Data\Delphi32\ZzDC_Public\tools\ZDesigner\Compiler\Zc.PAS, line 1835) (line: 4, col: 16) (what does it mean?)