Skip to content

IDL Problem Code 21 with alias return-vals-func

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 identifies return statements in functions that have too many arguments (i.e. things they return) when only one value is allowed

idl
function myAwesomeFunc
  compile_opt idl2
  return, 42, 84
  ;         ^^^^ problem here
end

The correct way to use return within procedures or procedure methods is:

idl
function myAwesomeFunc
  compile_opt idl2
  return, 42
  ;     ^^^^ correct syntax is to not return only one value
end

Licensed under MIT.