Re: minor bug on get_res_value and get_res_value_keep

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu May 06 2010 - 10:50:14 MDT

Hi Álvaro,

Thanks for pointing this out. Did it actually break some code for you? In general, I'm not
sure how much effect declaring a variable "local" has. Although, I think it can affect code
if you have a variable in your main code called "return_val".

--Mary

On May 6, 2010, at 4:25 AM, Álvaro M. Valdebenito B. wrote:

> Hi,
>
> I would like to report a minor bug on get_res_value and
> get_res_value_keep ($NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl)
>
> In both functions the the local variable intended as output is not used:
>
> function get_res_value(res,resname:string,default_val)
> local res_value
> begin
> [snip]
> return(return_val)
> end
>
> The fix is quite simple, just replace the line:
> local res_value
> by:
> local return_val
>
> Cheers,
> Álvaro.
>
> --
> Álvaro M. Valdebenito B., Dr. rer. nat. alvaro.valdebenito@met.no
> Air Pollution Section/Research Department Tel. +47-2296 3397
> Norwegian Meteorological Institute http:\\www.met.no
> P.O. Box 43 Blindern, 0313 Oslo, NORWAY http:\\www.emep.int/CWF
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 6 10:50:19 2010

This archive was generated by hypermail 2.1.8 : Fri May 07 2010 - 10:36:00 MDT