IDL Problem Code 33
with alias unclosed-main
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
If you have a main level program without an end, you'll get this error
idl
; main level
compile_opt idl2
a = 'foo'
if !true then begin
endif
; ^^^^ unclosed main
To correct, add an end
statement:
idl
; main level
compile_opt idl2
a = 'foo'
if !true then begin
endif
end
Concept: Batch Files
This error is a helper "error" to catch common mistakes. It is not a fatal error unless you have block statements in your main level program.
If you exclude the final end
you can use executive commands (like .reset
and .compile
freely), but this is an advanced use case and not common.