Search code examples
functionidl-programming-language

Error when defining function in IDL: "programs can't be compiled in single statement mode"


I'm working with IDL Version 8.0.1, Windows 7 Operating system.

When trying to define a function in the command line, I get the error "programs can't be compiled in single statement mode". Not quite sure how to fix. enter image description here


Solution

  • Normally you would define functions/procedures in a file, but you can do it from the command line:

    IDL> .compile
    - function triple, x
    -   return, 3 * x
    - end
    % Compiled module: TRIPLE