0

I 'm new to IDL and using IDL in command-line. When I want to invoke the function array_indices(), the error comes as:

>% Attempt to call undefined procedure/function: 'ARRAY_INDICES'.
>% Execution halted at: $MAIN$  

But I have checked, under my lib subdirectory, array_indices.pro exits, whose path goes as: Applications/exelis/idl83/lib. Then why does it behave like this? A similar problem occurs in another invoking command. I downloaded the textoidl.pro file and add it as

idl> !PATH = Expand_Path('+mydirectory\coyote') + ';' + !PATH

the textoidl.pro is under the directory coyote, but I tried that, it says:

>textoidl.pro
>% Syntax error.

I also tried other command added by coyote lib, some, or I should say, most of them work well, but a few really responds as

>*.pro
>%Syntax error.

Does anyone know why?

DavidH
  • 415
  • 4
  • 21
Schawn
  • 57
  • 1
  • 9
  • Please show exactly what you typed to get the above errors. – mgalloy Nov 07 '14 at 20:11
  • IDL's path specification is not entirely transparent, unfortunately. That said, I am fairly certain you are not setting the paths correctly. What do you get when you type the following: `IDL> HELP, !VERSION, /STRUC`? – honeste_vivere Nov 07 '14 at 20:43
  • I ask because I am not sure if this is an OS issue (i.e., is the semi-colon the path separator in Windows?). – honeste_vivere Nov 07 '14 at 20:44

1 Answers1

0

Can you do the following?

IDL> x = findgen(2, 3)
IDL> print, array_indices(x, [0, 3, 5])
% Compiled module: ARRAY_INDICES.
           0           0
           1           1
           1           2

One potential problem might be IDL's confusion between functions and array when indexing/calling with parentheses. Try:

IDL> compile_opt strictarr

first and then the above.

mgalloy
  • 2,356
  • 1
  • 12
  • 10