Skip to content

.out does not go out of procedure if last command before "end" is "return" #1866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
brandy125 opened this issue Jul 18, 2024 · 1 comment
Labels
bug Something isn't working dot-commands

Comments

@brandy125
Copy link

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
@GillesDuvert
Copy link
Contributor

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.

@GillesDuvert GillesDuvert added bug Something isn't working dot-commands labels Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dot-commands
Projects
None yet
Development

No branches or pull requests

2 participants