Re: small NCL glitch at end of file

From: Amit Kulkarni (amitkulz AT XXXXXX)
Date: Fri Apr 25 2003 - 11:07:27 MDT


Thanks Mary and Rick for the long answer. I wish NCL had a End of Line
character like C & Perl, and braces for nesting statements. Is it too
hard to change or will it now be too late to make such a change?

I am confused when I dont see braces or some sort of nesting delimiter.
Indentation doesn't seem natural without braces. I may sound radical
here :)

Amit
--- Rick Grubin <grubin@ucar.edu> wrote:
>
> 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@ncar.ucar.edu 303.497.1832
>

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Fri Apr 25 2003 - 13:10:28 MDT