Skip to content

IDL Problem Code 22 with alias return-vals-missing-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 dont have any arguments (i.e. things they return) when they should have one.

idl
function myAwesomeFunc
  compile_opt idl2
  return
  ;     ^^^^ problem here
end

The correct way to use return within functions or functions methods is:

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

Licensed under MIT.