Re: Error messages: source code line is blank

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Fri, 04 Aug 2006 14:55:25 -0600

Mary,

I checked for off by one thusly. I ensured that there were valid
statements on lines 103 and 105. The error message for line 104
still printed blank for the source code line.

I also made sure that line 104 was the actual line with the error,
in this case a true undefined procedure reference.

This is no show stopper, just a chronic inconvenience when trying to
debug. Thank you for checking into it.

--Dave

Mary Haley wrote:

> Dave,
>
> I think you may be up against an off-by-one error in NCL's error
> reporting code.
>
> The error may be actually happening on line 104. Can you double-check this
> and let me know if this is not the case.
>
> Meanwhile, I'm going to ask the NCL developers about this problem,
> because it has happened to me too.
>
> --Mary
>
>> fatal:syntax error: line 105 in file startave.ncl before or near \n
>>
>> -------------------------------^
>
> On Thu, 3 Aug 2006, Dave Allured wrote:
>
>> I have a general problem with the NCL interpreter. When I have a
>> syntax error in my script, a fairly informative error message is
>> printed. The message seems to attempt to show the offending line of
>> source code, a common feature in modern compilers. However, the
>> printed line is blank.
>>
>> Is there a fix for this? A typical session and my uname are shown
>> below. Thank you.
>>
>> --Dave Allured
>> CIRES Climate Diagnostics Center
>> NOAA Earth Systems Research Laboratory, Physical Sciences Division
>>
>> 36> ncl startave.ncl
>> Copyright (C) 1995-2006 - All Rights Reserved
>> University Corporation for Atmospheric Research
>> NCAR Command Language Version 4.2.0.a033
>> The use of this software is governed by a License Agreement.
>> See http://www.ncl.ucar.edu/ for more details.
>> (0) Load ncl scripts
>> (0) Load complete
>> fatal:syntax error: line 105 in file startave.ncl before or near \n
>>
>> -------------------------------^
>>
>>
>> fatal:syntax error: possibly an undefined procedure
>> fatal:Syntax Error in block, block not executed
>>
>> 37> uname -a
>> Darwin test909.noaa.gov 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26
>> 15:20:53 PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh
>> powerpc
Received on Fri Aug 04 2006 - 14:55:25 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 07 2006 - 14:59:58 MDT