Can variable type(dimension)/function definition check be skipped in NCL?

From: Àî¼ÎÅô <lijpbasin_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 24 2012 - 20:37:31 MDT

Dear NCL users:
NCL has the most restrict variable/function declaration check mechanism among all the languages I use. I understand that these checks are absolutely necessary to ensure the correctness and efficiency of the written programs.
However sometimes I found it rather cumbersome, for example there is no easy way to append a record to a existing list, even though function "array_append_record" is provided, if the original variable name needs to be kept.
If procedure B calls procedure A, the A must be defined before procedure B, although B can still call another version of A that is defined after, since any function/procedure can be redefined without difficulty, with the use of undef procedure, as the code below showed.
; Define procedure A
undef("A")
procedure A()
begin
  print("This is A before B")
end

; Define procedure B
undef("B")
procedure B()
begin
  A()
  print("This is B")
end

; Define procedure A
undef("A")
procedure A()
begin
  print("This is A after B")
end

begin
  B()
end

I guess function/procedure check can be carried out as late as the main code is being checked, and the variable dimension/type can be turned on/off by offering a flexible syntax check option. Is there any current solution I haven't seen or would it be implemented in future releases?

Thanks in advance!
Regards
Jiapeng

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 24 20:37:43 2012

This archive was generated by hypermail 2.1.8 : Mon Apr 30 2012 - 09:21:12 MDT