Skip to content

IDL Problem Code 72 with alias duplicate-arg-kw-var-def

Want to disable me? Check out the configuration guide to learn more.

Execution Error

This is a fatal error that prevents IDL from compiling or running code

This problem detects when there are two or more arguments or keywords with the same name.

Each argument, and keyword, should have a unique and different name.

Here is an example of this problem:

idl
function myFunc, arg, arg, kw1 = kw, kw2 = kw
  ;              ^^^  ^^^        ^^        ^^  duplicate arg or kw variable
  compile_opt idl2
  return, 42
end

Which can be fixed by changing the argument and keyword names:

idl
function myFunc, arg1, arg2, kw1 = kw1, kw2 = kw2
  ;              ^^^^  ^^^^        ^^^        ^^^  OK!
  compile_opt idl2
  return, 42
end

Licensed under MIT.