David,
Right, the bug was mine, formed when I'd supplied a FrameSet to
KPG1_GTPLR, needed for the polar co-ordinates transformations, while not
altering the BC argument from "0.0D0" to an array. This was amongst a
whole load of other changes... It was immediately obvious looking at
the code instead of relying on tools that only threw in a red herring.
It's evident that the other calls to KPG1_GTPOS in KAPPA will work,
because a Frame is passed in every case, but beware if you switch to
supplying a FrameSet, as we were discussing in the CENTROID context last
week, a BC _array_ must of course be passed. Passing a single numeric
value to an argument to what will often be a multi-element array strikes
me as not good defensive programming, and caught a sleepy me out.
So it's more a question of the compiler not picking up the mismatch and
flagging it when KPG1_GTPLR is called, not when the BC array is finally
written by AST. Could that be the used of assumed-size declarations?
I suppose you could check that the lengths of arrays having sufficient
elements, but it's probably not worth the bother.
Thanks again for your assistance.
Malcolm
|