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

Home » Public Forums » archive » Re: data comparison
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: data comparison [message #44271 is a reply to message #44270] Wed, 01 June 2005 19:25 Go to previous messageGo to previous message
angela is currently offline  angela
Messages: 7
Registered: June 2005
Junior Member
Thank you! I tried both and they still give me the same wrong answer
-1.
Any other suggestions?

Thank you for the help,
Angela

Benjamin Hornberger wrote:
> angela wrote:
>> I am trying to extract specific values from an array, datax (string
>> array[1,300]).
>> When I type the command
>>
>> print,datax GE 100
>>
>> it works fine and it gives me the correct answer. But when I type
>>
>> print,datax GE x
>>
>> where x has been defined in the program earlier as 100 and is an
>> integer array[1]
>> the result is -1 which is wrong since there are values in this array
>> that are greater or equal than 100.
>> Does anyone have an idea what is going on?
>>
>> Thank you,
>> Angela
>>
>
> Why is your data array of string type? Try to convert one to the type of
> the other before comparison:
>
> print, datax GE string(x)
>
> or
>
> print, fix(datax) GE x
>
> Good luck,
> Benjamin
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Python reader for IDL save files.
Next Topic: Job announcement

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

Current Time: Sat Oct 11 08:16:58 PDT 2025

Total time taken to generate the page: 0.63993 seconds