compile_opt (was: Re: Reading Wav files) [message #31833] |
Thu, 22 August 2002 06:19 |
Jaco van Gorkom
Messages: 97 Registered: November 2000
|
Member |
|
|
"JD Smith" <jdsmith@as.arizona.edu> wrote in message
news:pan.2002.08.21.20.24.41.192394.2937@as.arizona.edu...
> ...
> You could also just put "compile_opt STRICTARR" in your startup file,
> and I think it then applies to all routines and interactive commands
> (anybody know for sure?).
No, it then applies only to the main level (I tested it once). If it
would apply to all routines, then it would immediately break any code
in the big libraries that you might be using.
It is a very good idea, in my opinion, to start each and every routine
with "compile_opt idl2". This not only enforces square bracket array
subscripting, but also makes long integers the default. This prevents
FOR-loop problems like in yesterdays thread "From a novice in IDL".
cheers,
Jaco
|
|
|