gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
277 stars 61 forks source link

stopped line information is wrong if while loop does not contain a command #1867

Open brandy125 opened 4 months ago

brandy125 commented 4 months ago

This program reports line 0 and 4 if ".so" is applied

pro doit
stop
print,'5'
while 1 do begin & endwhile
end
GDL> .so
5
% Stepped to: DOIT                 4 /home/chris/doit.pro
GDL> .so
% Stepped to: DOIT                 0 /home/chris/doit.pro
GDL> .so
% Stepped to: DOIT                 4 /home/chris/doit.pro
GDL> .so
% Stepped to: DOIT                 0 /home/chris/doit.pro

If the while loop contains any command then the reported line is ok:

pro doit
stop
print,'5'
while 1 do begin & wait,0.1 & endwhile
end
GDL> .so
5
% Stepped to: DOIT                 4 /home/chris/doit.pro
GDL> .so
% Stepped to: DOIT                 4 /home/chris/doit.pro
GDL> .so
% Stepped to: DOIT                 4 /home/chris/doit.pro