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

Home » Public Forums » archive » Re: MAKE_ARRAY question
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: MAKE_ARRAY question [message #24727 is a reply to message #24726] Fri, 13 April 2001 11:38 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Paul van Delst <paul.vandelst@noaa.gov> writes:

> Ben Tupper wrote:
>>
>> Hi Paul,
>>
>> X = MAKE_ARRAY( n_pts, TYPE = 4 + KEYWORD_SET(DOUBLE), /NOZERO)
>>
>> The above should get you the correct type of array (Double type is 5
>> while Float type is 4.)
>
> True, but if double = 3 (in which case the keyword is also considered "set") the type
> would be wrong (a string array!).

Huh? So what if double EQ 3! Vis:

IDL> print, keyword_set(1)
1
IDL> print, keyword_set(2)
1
IDL> print, keyword_set(3)
1

For KEYWORD_SET, I think "truth" is defined as non-zero.

Ooops. What do you think this one should report? Heh.

print, keyword_set([0])


Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Postscript font usage
Next Topic: Re: FOR statement

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

Current Time: Sun Oct 12 16:52:24 PDT 2025

Total time taken to generate the page: 0.39925 seconds