Re: Re: scope of a variable

From: Takeshi Enomoto (eno AT XXXXXX)
Date: Tue Sep 14 2004 - 18:46:23 MDT

  • Next message: MUHTARJAN osman: "negtive lag correlation"

    Dear Dennis,

    Thank you for a good example.

    On 2004/09/15, at 7:33, Dennis Shea wrote:

    > Sometimes an example is worth a thousand 'official' words. :-)

    Indeed.

    > This file contains no 'begin/end' statements

    I didn't know this!
    The variables before "begin" are global and
    common to functions and procedures and the main, right?

    It was not obvious to me that I could have
    functions and procedures with the main in the same file,
    just as in Pascal.

    I assumed that a variable declared in the main is global,
    which turned to be wrong.
    That was the source of confusion.

    Now the scope of variables in ncl is much more clear to me.
    Thanks.

    -----
    Dr. Takeshi Enomoto
    eno AT jamstec.go.jp
    Earth Simulator Center

    _______________________________________________
    ncl-talk mailing list
    ncl-talk AT ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Wed Sep 15 2004 - 07:25:25 MDT