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

Home » Public Forums » archive » Empty FOREACH loop
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Empty FOREACH loop [message #75108] Mon, 14 February 2011 15:47 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
I was quite surprised when the following raised an error for me:

IDL> foreach g, [] do help, g
% Variable is undefined: <UNDEFINED>.
% Execution halted at: $MAIN$

Does this seem like unexpected behavior? I was expecting the loop just
not to execute.

Of course, whatever the right answer is, it shouldn't do this (as it
does on my Mac):

IDL> foreach g, [] do help, g
% Temporary variables are still checked out - cleaning up...

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Overlay a coloured boundary on a gray scale image
Next Topic: shading a portion of the graph

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

Current Time: Fri Oct 10 05:05:41 PDT 2025

Total time taken to generate the page: 1.27961 seconds