FOR .. NEXT Loop

Control Structures – FOR .. NEXT Loop

 

Nested For..Next loop

/*

Control Structures – FOR .. NEXT Loop

Control structures are code fragments that allow

– execution repeatedly by any number of time or

– if / while a logical condition satisfying by a true value.

All control structures may be nested and always have a beginning  and ending statement.

The first kind of control structures are looping structures and first of them is  FOR..NEXT Loop.

For more information refer here

*/


PROCEDURE Main()

FOR nLines := 1 TO 10
      FOR nColumns := 1 TO 10
         ?? STR( nLines * nColumns, 4 )
      NEXT nColumns 
      ?
   NEXT nLines

   WAIT

RETURN // Main()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.