gdl
gdl copied to clipboard
.out does not go out of procedure if last command before "end" is "return"
This simple program is just to simulate the problem that ".out" does not go out of a procedure if the last command is "return"
bash$ gdl
GDL - GNU Data Language, Version v1.0.6-16-gc154de16
GDL> doit
% Compiled module: DOIT.
% Stop encountered: DOIT 3 /home/chris/doit.pro
GDL> .out
5
GDL> help
% At DOIT 4 /home/chris/doit.pro
$MAIN$
pro doit
stop
print,'5'
return
end
This comes from GDL 'optimizing out' the return. Without return in the PRO, or if 'doit' was a FUNCTION
function doit
stop
print,'5'
return,12
end
All would be OK.
But, indeed, there is no possibility to '.out' as the .out is blocked on line 4 . This is a bug.