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

Home » Public Forums » archive » forcing variable definition in IDL?
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: forcing variable definition in IDL? [message #24973 is a reply to message #24876] Tue, 01 May 2001 10:18 Go to previous messageGo to previous message
William Daffer is currently offline  William Daffer
Messages: 34
Registered: February 1999
Member
davidf@dfanning.com (David Fanning) writes:
[...]

> Don't bother. IDL scalars *are* single element arrays:
>
> IDL> a=5
> IDL> a[0] = 6 & Print, a
>

Um... Not true.

IDL> a=['foo|bar']
IDL> print,strsplit(a,'|',/extract)
% STRTOK: Expression must be a scalar in this context: STRING.
% Execution halted at: STRSPLIT 24
/usr/local/rsi/idl_5.3/lib/strsplit.pro
% $MAIN$
IDL> retall
IDL> print,strsplit(a[0],'|',/extract)
foo bar
IDL>

There are some other RSI supplied code where one sees this behavior.

By the way, this is idl 5.3. I haven't checked idl 5.4.

whd
--
Outside of a dog a book is man's best friend.
Inside of a dog it's too dark to read
Groucho Marx
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Dereferencing a Pointer Array
Next Topic: Array Concatenation Tutorial

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

Current Time: Wed Oct 08 19:15:19 PDT 2025

Total time taken to generate the page: 0.00601 seconds