Skip to content
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

GDL don't detect multiple uses of the same keyword when calling pro or function #1823

Open
alaingdl opened this issue Apr 26, 2024 · 1 comment

Comments

@alaingdl
Copy link
Contributor

code :

$ more toto.pro

pro toto1, key1=key1;, key1=key1
print, 'toto1'
end
function toto2, key2=key2;, key2=key2
print, 'toto2'
return, 1
end

pro toto
toto1, key1='aze', key1='rty'
print, toto2(key2='aze', key2='rty')
end

Running GDL :

GDL> .r toto
% Compiled module: TOTO1.
% Compiled module: TOTO2.
% Compiled module: TOTO.
GDL> TOTO
toto1
toto2
       1

Running IDL :

IDL> .r toto
% Compiled module: TOTO1.
% Compiled module: TOTO2.
% Compiled module: TOTO.
IDL> toto
% Duplicate keyword KEY1 in call to: TOTO1
% Execution halted at: TOTO               13 /home/alaingdl/toto.pro
%                      $MAIN$          
IDL> .skip 1
% Skipped to: TOTO               15 /home/alaingdl/toto.pro
IDL> .con
% Duplicate keyword KEY2 in call to: TOTO2
% Execution halted at: TOTO               15  /home/alaingdl/toto.pro
%                      $MAIN$          

But the detection of repeated keyword is (more or less) OK !
(same code, removing the ";")


IDL> .r toto
pro toto1, key1=key1, key1=key1
                               ^
% KEY1 is already defined with a conflicting definition.

GDL> .r toto.pro
% Ambiguous keyword: KEY1


@GillesDuvert
Copy link
Contributor

yes, known feature. Is it really bothering?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants