Re: small NCL glitch at end of file

From: Sylvia Murphy (murphys AT XXXXXX)
Date: Fri Apr 25 2003 - 11:26:20 MDT

  • Next message: Dennis Shea: "Re: small NCL glitch at end of file"

    Amit,
    oh you c programmer you! us lowly fortran types freak out when we see
    braces. we are always forgetting them. Alas the clash of two cultures :)

    On Fri, 25 Apr 2003, Amit Kulkarni wrote:

    > 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 AT 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 AT 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 AT ucar.edu
    > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
    >

    ******************************************************
    Sylvia Murphy EML: murphys AT ucar.edu
    NCAR CGD/CAS PHN: 303-497-1720
    3080 Center Green Drive FAX: 303-497-1333
    Boulder CO 80301

    WEB: http://www.cgd.ucar.edu/csm/support/
         http://www.cgd.ucar.edu/csm/support/CSM_Graphics/
    ******************************************************

    _______________________________________________
    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:28 MDT