nomainwin UpperLeftX = 20 UpperLeftY = 20 WindowWidth = 550 WindowHeight = 570 dim grid( 25, 25) for x =0 to 24 for y =0 to 24 grid( x, y) =int( 2 *rnd( 1)) next y next x open "Show 2D array" for graphics_nsb as #wg #wg "trapclose [quit]" #wg "color white" gui$ = "down ; fill 60 60 60" for x =0 to 24 for y =0 to 24 gui$ += ";backcolor " if grid( x, y)=0 then gui$ += "black" else gui$ += "white" gui$ += ";place "; 20 +20 *x; " "; 20 +20 *y gui$ += "; boxfilled "; 20 +20 *x +16; " "; 20 +20 *y +16 next y next x #wg gui$ wait [quit] close #wg end