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

Home » Public Forums » archive » Re: Little help on arrays
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: Little help on arrays [message #38051 is a reply to message #38049] Mon, 16 February 2004 07:12 Go to previous messageGo to previous message
Pepijn Kenter is currently offline  Pepijn Kenter
Messages: 31
Registered: April 2002
Member
Nuno Oliveira wrote:
> How do I compare one array with another? I want to avoid comparing
> position per position.
>
> IDL> if [1,1] eq [1,1] then print, 'bingo!'
> % Expression must be a scalar or 1 element array in this context: <BYTE
> Array[2]>.
> % Execution halted at: $MAIN$
>
You can use the array_equal procedure to compare arrays.

By the way, the result of the expresion [1,1] eq [1,1] is also an array
and can therefor not be used in the IF-statement.

IDL> print, [1,1] eq [1,1]
1 1

Pepijn.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Little help on arrays - 2nd try
Next Topic: array multiplying (for a change)

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

Current Time: Wed Oct 08 19:27:16 PDT 2025

Total time taken to generate the page: 0.00403 seconds