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

Home » Public Forums » archive » get IDL to issue warning or throw error for mismatched 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: get IDL to issue warning or throw error for mismatched arrays [message #93340 is a reply to message #93334] Fri, 17 June 2016 05:50 Go to previous messageGo to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 06/16/2016 06:43 PM, Dick Jackson wrote:
> On Thursday, 16 June 2016 07:59:02 UTC-7, Markus Schmassmann wrote:
>> is there any way to get IDL to issue a warning or throw an error in
>> for mismatched arrays like those below?
>>
>> indgen(2,2)+indgen(3,3)
> Here is the behaviour we see, that the result is the size of the
> "overlapping" of the two arrays: IDL> help,indgen(2,2)+indgen(3,3)
> <Expression> INT = Array[2, 2]
>
> I was hopeful that COMPILE_OPT STRICTARRSUBS would help. [...]
> but...
>
> IDL> help,indgen(2,2)+indgen(3,3) <Expression> INT = Array[2, 2]
>
> It does not change the behaviour with different-shaped arrays. If
> you have to test arrays a and b for differing shape, a simple check
> is:
>
> IF ~Array_Equal(Size(a, /DIMENSIONS), Size(b, /DIMENSIONS)) THEN ...
>
> Hope this helps,
unfortunately this is not news for me, I'm just looking for a way to
catch my own programming errors without many otherwise unnecessary tests
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 8,2 cannot call ENVI function
Next Topic: Mismatch between video frame dimensions and stream using Coyote graphics

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

Current Time: Wed Oct 08 11:43:44 PDT 2025

Total time taken to generate the page: 0.00401 seconds