03 Jul 2020 19:36
FOR nCont = 1 TO Len( ::acKeyboard )
FOR nCont2 = 1 TO Len( ::acKeyboard[ nCont ] )
@ ::nTop + 1 + nCont * 2, ::nLeft + 1 + ( nCont2 - 1 ) * 5 SAY ::acKeyboard[ nCont, nCont2 ]
NEXT
NEXT
FOR EACH aLinhaTeclado IN ::acKeyboard
FOR EACH cTecla IN aLinhaTeclado
@ ::nTop + 1 + aLinhaTeclado:__EnumIndex * 2, ::nLeft + 1 + ( cTecla:__EnumIndex - 1 ) * 5 SAY cTecla
NEXT
NEXT
08 Jul 2020 16:47
09 Jul 2020 11:53
NiltonGM escreveu:Gosto muito de usar o for each, switch e o with object
09 Jul 2020 13:12
JoséQuintas escreveu:NiltonGM escreveu:Gosto muito de usar o for each, switch e o with object
O SWITCH ainda acho esquisito.
Isso porque ele é diferente do DO CASE, pode entrar em todas as condições seguintes.
SWITCH nVar
CASE 1
...codigo1...
EXIT
CASE 2
...codigo2...
EXIT
CASE 3
...codigo3...
EXIT
ENDSWITCH