FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour declare array
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
declare array
Posted: Thu Mar 16, 2017 02:26 PM

I must declare a multi array type
aVal := { { } ,;
{ } }

But I not Know how many records there are

How I can say to fivewin if

aVal:={ }

is multiple array ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: declare array
Posted: Thu Mar 16, 2017 04:49 PM

Silvio,

maybe ( sample ) :

LOCAL aArray := { { 1, 2 },{ 1, 2 },{ 1, 2 } }
? LEN ( aArray ) // Result = 3
? LEN ( aArray[1] ) // Result = 2

regards
Uwe :?:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: declare array
Posted: Thu Mar 16, 2017 06:23 PM
Uwe,
Pls
I not Know how many record I can have
I need it for the nages test of circular graph http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33772

it wants multiple array ...
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: declare array
Posted: Fri Mar 17, 2017 12:10 AM

aData := ARRAY( nRows, nCols )

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: declare array
Posted: Mon Mar 20, 2017 09:56 AM

yes of course !!!

BUT I not Know the value of nRows and nCols
if at init I made
aVal:={ }

then not run because the procedure understood the array is simply and not multiple as

aVal:={ { } ,;
{ },;
{ } }

I insert 3 records for make a sample

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: declare array
Posted: Wed Mar 22, 2017 12:09 AM

Function IsMultipleArray( aArray )
Return iif( valtype( aArray[1]="A", .T., .F. )

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion