IDL Problem Code 15
with alias colon-in-func-method
Want to disable me? Check out the configuration guide to learn more.
Warning
Using a colon for indexing should only happy when using brackets.
Legacy IDL code allowed for both, but modern usage of IDL should have brackets and not parentheses.
This identifies when we have a function method call that contains the colon operator inside.
It indicates that you should likely be using brackets to index your arrays and not parentheses.
idl
!null = myvar.thing(1:42)
;^^^^^^^ Colon in function
To fix, swap out your parentheses with brackets:
idl
!null = myvar.thing[1:42]
;^^^^^^^ Yippee, no problem!