Re: another IDL oddity [message #65171] |
Tue, 17 February 2009 08:12 |
Carsten Lechte
Messages: 124 Registered: August 2006
|
Senior Member |
|
|
Bringfried Stecklum wrote:
> from bash
>> echo my_procedure,'Hello.world'|idl
bash is eating the quotation marks, so IDL only sees the naked Hello.world
which generates an error if a variable named hello is undefined or not
a structure.
echo my_procedure,\'Hello.world\'|idl
should work.
> Any hints?
IDL seems to check parameters for procedure calls before compiling the
procedure. An undefined parameter is treated as a named variable and
simply handed on to the procudure, while the attempt to access an
undefined variable's structural tags throws an error immediately, since
there is no result that can be passed to the procedure.
Was that your question?
chl
|
|
|
Re: another IDL oddity [message #65173 is a reply to message #65171] |
Tue, 17 February 2009 08:06  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Tue, 17 Feb 2009, Bringfried Stecklum wrote:
> Folks, here is another one I recently stumbled upon. How about that
>
> more ~/IDL/my_procedure.pro
> pro my_procedure,arg
> print,arg
> end
>
> within IDL
> IDL> my_procedure,'Hello.world'
> % Compiled module: MY_PROCEDURE.
> Hello.world
> IDL> exit
>
> from bash
>> echo my_procedure,'Hello.world'|idl
> IDL Version 6.4 (linux x86_64 m64). (c) 2007, ITT Visual Information
> Solutions
> Installation number: 12207.
> Licensed for use by: TLS Tautenburg
>
> % Compiled module: LOADCT.
> % Compiled module: FILEPATH.
> % Compiled module: PATH_SEP.
> % Expression must be a structure in this context: HELLO.
> % Execution halted at: $MAIN$
>
echo "my_procedure,'Hello.world'"|idl works.
regards,
lajos
|
|
|