A core developer will have to handle part 2.
Part 1:
Is there any way to turn the following into a procedure ?
No. Deletion of parameters to functions and procedures is not allowed in NCL
D
Lunde, Bruce N CIV NAVOCEANO, NP1 wrote:
> Hello,
>
> Is there any way to turn the following into
> a procedure ?
>
> if( isvar("foo") )then
> delete(foo)
> end if
>
>
> Related to this, is there any way to perform
> a "try-catch" statement in order to try executing
> a statement and catching any errors so that the
> script does not exit on a failure ? For example,
>
> begin
> print(1)
> delete(myvar)
> print(2)
> end
>
> will never get to "print(2)" if "myvar" does
> not exist (using delete() as an example of
> something that could fail).
>
> Something like
>
> try:
> delete(myvar)
> catch IERR:
> print("no myvar, error code "+IERR)
> endtry
>
>
> Thanks, Bruce
>
>
> =====
> Bruce Lunde
> Bruce.Lunde_at_navy.mil
> 228-688-5843
> Code NP1
> Naval Oceanographic Office
> Stennis Space Center, MS
> =====
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-- ====================================================== Dennis J. Shea tel: 303-497-1361 | P.O. Box 3000 fax: 303-497-1333 | Climate Analysis Section | Climate & Global Dynamics Div. | National Center for Atmospheric Research | Boulder, CO 80307 | USA email: shea 'at' ucar.edu | ====================================================== _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Wed Aug 22 2007 - 09:25:30 MDT
This archive was generated by hypermail 2.2.0 : Thu Aug 23 2007 - 15:57:17 MDT