comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Illegal variable name
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Illegal variable name [message #92906 is a reply to message #92903] Sun, 20 March 2016 16:25 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 3/20/16 12:50 AM, Sapna Mishra wrote:
> Hi,
>
> I am using this command in one of my bash script :
>
> l=$(idl -quiet -e "print, n_elements('tmp1')")
>
> its showing error: Illegal variable name.
>
> How ever same script is running on other system.
> What could be the reason???
>

The way this is written, 'tmp1' is a scalar string, so N_ELEMENTS should
always return 1.

In any case, I think "Illegal variable name" is a bash error because IDL
just says "syntax error" when using an invalid variable name:

IDL> print, n_elements(3days)

print, n_elements(3days)
^
% Syntax error.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
[Message index]
 
Read Message
Read Message
Previous Topic: error in cgWindRose code
Next Topic: Re: Apply a shapefile to raster images in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 11:44:34 PDT 2025

Total time taken to generate the page: 0.88069 seconds