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 #94048 is a reply to message #93331] Fri, 06 January 2017 05:21 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le jeudi 16 juin 2016 16:59:02 UTC+2, Markus Schmassmann a écrit :
> 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)

You might use the list::ToArray() method, and throw the error :

IDL> help, (list(indgen(2,2),indgen(3,3))).ToArray()
% LIST::TOARRAY: Unable to concatenate arrays: Element 1
% Execution halted at: $MAIN$

while :

IDL> help, (list(indgen(2,2),indgen(2,2))).ToArray()
<Expression> INT = Array[2, 2, 2]

Cheers,
alx.
[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: Thu Oct 09 22:52:09 PDT 2025

Total time taken to generate the page: 0.16101 seconds