Page 1 of 1
Line numbers and better syntax error messages
Posted: Tue Jun 12, 2012 7:36 pm
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".
Posted: Wed Jun 13, 2012 9:11 am
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.
Posted: Sun Apr 07, 2013 10:00 am
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.
Posted: Mon Apr 08, 2013 3:33 am
Posted: Sat Feb 28, 2015 7:33 am
One that always confuses me is the error that appears when a Condition component tries to process something like this:
Code: Select all
return ((A == 99) (B == 66));
//originally there was a "&&" (or "||") between the two conditions,
//but it got lost during editing...
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?)
Posted: Mon Mar 02, 2015 8:44 am
Thanks, I've improved that error message for next update.