Skip to content

IDL Problem Code 42 with alias use-idl2

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

Best Practice

For modern IDL programming, compile_opt idl2 is a must to help prevent common mistakes and normalize how people should write their IDL code.

Some compile_opt errors are automatically fixed on save (when configured).

This problem code detects when you use the defint32 or strictarr compile options which have been replaced with idl2.

Here's an example of how to reproduce the error:

idl
pro myPro
  compile_opt defint32, strictarr
  ;           ^^^^^^^^  ^^^^^^^^ use idl2

  ; ... logic

end

To fix, replace the compile options with idl2:

idl
pro myPro
  compile_opt idl2

  ; ... logic

end

Licensed under MIT.