since IDL 6.3 there is a strange behaver:
while compiling functions calling not yet defined function IDL doesn't report errors. More over, RESOLVE_ALL also doesn't report the problem. But while running the program, IDL stops with error (the procedure was compiled without knowladge about the calling function). It is obvious, that calling the function from command line works fine (the function is compiled, although after the procedure in question).
The big problem concerning this feature is that writing big programs it is difficult to look after functions order. I think RESOLVE_ALL _MUST_ report this problem. How can i check my program for functions wrong order?
Here is the test file and log file demonstrating the situation
------------------ test.pro --------------------
pro test
print, A(5)
end
function A, x
return, x
end
----------------------------------------------------
-------------- Console Log ------------------
IDL> .COMPILE '/home/ps/test.pro'
% Compiled module: TEST.
% Compiled module: A.
IDL> resolve_all
% Compiled module: RESOLVE_ALL.
% Compiled module: PATH_SEP.
% Compiled module: UNIQ.
IDL> test
% Variable is undefined: A.
% Execution halted at: TEST 2 /home/ps/test.pro
% $MAIN$
IDL> print, a(5)
5
----------------------------------------------------
|