Fill a two dimensional array

/*
AFIL2.prg : Fill a two dimensional array with a fixed value
 
*/
PROCEDURE Main()
 
   SetMode( 25, 80 ) 
   CLS
 
   aArray := ARRAY( 5, 2 )
 
   AEVAL( aArray, { | a1 | QOUT( a1[ 1 ], a1[ 2 ] ) } )
 
   AEVAL( aArray, { | a1 | AFILL( a1, 0 ) } )
 
   AEVAL( aArray, { | a1 | QOUT( a1[ 1 ], a1[ 2 ] ) } )
 
   SETPOS( 23, 0 ) 
   WAIT "EOF AFIL2.prg"
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.