AIPS NRAO AIPS HELP file for BY in 31DEC13



As of Sat May 18 6:41:50 2013



HELP SECTION

BY
Type:  Verb
Use:   In the FOR loop construction BY is used to signal the
       value by which to increment the incrementing variable.
       (See HELP FOR).  This value may be negative. The
       inclusion of BY is optional. If omitted, the increment
       will default to 1.
Grammar:  FOR variable = start TO fini BY increment
             statement1; statement2;... ; END
       where 'variable' is a scalar variable that will change
       each time through the loop, beginning at 'start', have
       'increment' added to it each time through the loop (the
       increment may be positive or negative) and will end when
       the next loop would be executed with 'variable' greater
       than (increment > 0; less than with increment < 0)
       'fini'.  Note that the loop will be executed at least
       once no matter what the start, fini and increment
       parameters are. If the BY section is omitted, the
       increment will default to 1.  Statementi are AIPS
       statements.
Example:   FOR I = K+3 TO K BY -1; A(I+1) = A(I); END
       This example will shift the section of array A between
       A(K) and A(K+3) forward 1 element.

EXPLAIN SECTION


AIPS