Antonio and EMG,
Thanks.
With: SELECT Nombre FOR "Laureano" TO "Paco"
Can the SELECT / FOR be with more than one field?
like: FistName + FamilyName
I was trying EMG's example for arrays. It works good.
My problem is with the multi dimensional array filled from a data base. I'm trying the enclosed code and receive error:
LOCAL aArray := { {}, {}, {} }
LOCAL nCur := 1
LOCAL oWnd, oBrw
//
DO WHILE !MasLoad->( EOF() )
AADD( aArray[1], MasLoad->ContNumber )
AADD( aArray[2], Str( MasLoad->ContSize, 2 ) )
AADD( aArray[3], MasLoad->ContKind )
MasLoad->( dbSkip() )
ENDDO
DEFINE WINDOW oWnd TITLE "Status "
@ 1, 1 LISTBOX oBrw FIELDS;
IF( EMPTY( aArray ), "", aArray[ nCur, 1 ] ),;
IF( EMPTY( aArray ), "", aArray[ nCur, 2 ] ),;
IF( EMPTY( aArray ), "", aArray[ nCur, 3 ] );
HEADERS "Container", "Size", "Type" ;
SIZE 220, 167
oBrw:bLogicLen = { || Len( aArray ) }
oBrw:bGoTop = { || nCur := 1 }
oBrw:bGoBottom = { || nCur := Len( aArray ) }
oBrw:bSkip = { | nSkip | Skipper( aArray, @nCur, nSkip ) }
oBrw:cAlias = "ARRAY"
@ 12, 2 BUTTON "Dlg" SIZE 80, 30 ACTION MsgInfo( aArray[ nCur, 1 ] )
@ 12,17 BUTTON "Done" SIZE 80, 30 ACTION oWnd:End()
ACTIVATE WINDOW oWnd ON CLICK MsgInfo( "Click!" )
Thanks,
Moshe Yarden