this way?
rem
rem AGK Application 2.0.22
rem MR
SetWindowSize(800,600,0)
SetVirtualResolution(100,100)
dim grid[2,2] as string
grid[0,0]="A"
grid[1,0]="B"
grid[2,0]="C"
grid[0,1]="D"
grid[1,1]="E"
grid[2,1]="F"
grid[0,2]="G"
grid[1,2]="H"
grid[2,2]="I"
//Normal
for y=0 to 2
for x=0 to 2
tx=createtext(grid[x,y])
SetTextPosition(tx,50+x*8,y*8)
next
next
do
if 1=1
//Diagonal
for y=0 to 2+2
x=0
print("Row "+str(y))
GoUpRight(x,y)
next
endif
print("----------------")
if 1=1
//Diagonal
for y=0 to 2+2
x=2
print("Row "+str(y))
GoUpLeft(x,y)
next
endif
if GetRawKeyReleased(27)
exit
endif
Sync()
loop
end
function GoUpRight(x,y)
if y<0 then exitfunction
if (x>=0 and x<=2) and (y=>0 and y<=2)
//print("x: "+str(x)+" y:"+str(y))
t$=grid[x,y]
print(t$)
endif
x=x+1
y=y-1
GoUpRight(x,y)
endfunction
function GoUpLeft(x,y)
if y<0 then exitfunction
if (x>=0 and x<=2) and (y=>0 and y<=2)
//print("x: "+str(x)+" y:"+str(y))
t$=grid[x,y]
print(t$)
endif
x=x-1
y=y-1
GoUpLeft(x,y)
endfunction
AGK (Steam) V2.0.22 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12)