On Fri, 25 Apr 2003, Amit Kulkarni wrote:
> why does NCL spit out this when there is no newline after the 'end'
> statement at the end of file? Is this by design?
>
> Thanks!
>
>
> fatal:syntax error: line -1 before or near
> end
> ---^
>
> fatal:error in statement
Hi Amit,
NCL script code must be parsed to ensure that the script syntax is valid
and contains no errors, e.g. there must be an "end do" for each "do"
statement.
Part of NCL's syntax is that a "statement" in NCL has no specific
terminating character, like C's and Perl's ";" character. NCL's parser
looks for an end-of-line character (a carriage return/newline combination)
as it's statement (and line) termination. Without this termination
character for a statement, NCL's parser deduces that the statement in
question is incomplete, and emits the error you're seeing.
The short answer: each NCL statement requires a newline to properly
terminate it, in a syntactical sense.
-Rick.
-- Rick Grubin Visualization + Enabling Technologies Scientific Computing Division National Center for Atmospheric Research grubin AT ncar.ucar.edu 303.497.1832_______________________________________________ ncl-talk mailing list ncl-talk AT ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Fri Apr 25 2003 - 13:10:27 MDT