[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multi conditional for loops



Hi *,
   I am interested in coding with a c/c++ style multi-conditional for
loop. 

c++ ex:
for ( int i = 0; ( ( i < 10 ) && ( j <= 4 ) ); i++ ) 
{ 
    /* do something */
}

Here is sample IDL code. It runs but produces very interesting
results. (this is IDL5.3 on Linux RH6.2)

PRO test
j = 0
FOR i = 0, ((j LE 4) AND 10) DO BEGIN
    j = j + 2
    PRINT, i, j
ENDFOR
END

thanks for any info,
   ken.