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

Home » Public Forums » archive » Re: Starting a for loop within an if 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
Re: Starting a for loop within an if loop [message #57638 is a reply to message #57637] Thu, 20 December 2007 02:08 Go to previous messageGo to previous message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
On Wed, 19 Dec 2007 19:57:50 -0800 (PST), Mat Smith
<mat.smith@port.ac.uk> wrote:

> IF keyword_set(mc) THEN BEGIN
> FOR i=0,n-1 DO BEGIN
> t=d[i]
> ENDIF
>
> and later in the program
>
> IF keyword_set(mc) THEN BEGIN
> ENDFOR
> ENDIF

You're thinking of preprocessor directives like in e.g. C++

#ifdef <token>
/* code */
#endif

So at compile time it looks whether <token> is defined or not and
includes or excludes code in compilation. Even if IDL would be
compiled and have a preprocessor, you only know whether <token> is
defined ("keyword is set" if you will) at runtime.

Btw, it's an "if statement" not an "if loop". I don't want to offend
you, but I was glad someone told me that ones. Time to return the
favour ;-).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Debugging in IDL 7
Next Topic: Re: IDL 7 on Ubuntu (probably also relevant to Fedora 8)

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

Current Time: Fri Oct 10 11:19:15 PDT 2025

Total time taken to generate the page: 7.04127 seconds