giloo
-
2014-02-28
- status: open --> closed-fixed
Description
When array is passed as an argument, function JULDAY ignores all its elements except the first one when the number of arguments is =4 or >=5.
Reason
Premature return from function BaseGDL* julday(EnvT* e) In the file basic_pro.cpp (return operators are placed inside loops, not after them).
How to reproduce
Execute:
GDL> print, julday(1, 1, 1, [17347584., 17347590.])
Expected output:
2444239.5 2444239.8
Actual output:
2444239.5 0.0000000
How to fix
Move return operators into right places. Diff-file is attached. Also I noticed that there are missing parenthesis around conditions in maxEl searching block. Fixed it also.