Skip to content

IDL Problem Code 108 with alias standalone-expression

Execution Error

This is a fatal error that prevents IDL from compiling or running code

This reported error indicates that there are IDL statements that need something more to make them valid syntax.

As the error reports, this can have one of two causes and fixes.

Assign to Value

The most common case you notice this error getting reported is when a statement needs to be assigned to a variable to be valid syntax. Here is an example:

idl
compile_opt idl2

; plot some data
plot(myData)

end

Which can be fixed by saving the return value from plot

idl
compile_opt idl2

; plot some data
myplot = plot(myData)

end

Pro Tip

IDL does not support function calls by themselves. Functions always return a value in IDL which means the returned value needs to be assigned to something.

Value Assigned to Expression

The other scenario you may encounter this issue is when you haven't quite finished your line of code.

Maybe you are accessing elements from an array and forgot to update the values:

idl
compile_opt idl2

; make some data
arr = [42, 84, 126]

; manipulate data
arr[0]

end

Which can be fixed by finishing your code:

idl
compile_opt idl2

; make some data
arr = [42, 84, 126]

; manipulate data
arr[0] *= 2

end

Licensed under MIT.