declare array

declare array

Postby Silvio.Falconi » Thu Mar 16, 2017 2: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6757
Joined: Thu Oct 18, 2012 7:17 pm

Re: declare array

Postby ukoenig » Thu Mar 16, 2017 4: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: declare array

Postby Silvio.Falconi » Thu Mar 16, 2017 6: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6757
Joined: Thu Oct 18, 2012 7:17 pm

Re: declare array

Postby nageswaragunupudi » Fri Mar 17, 2017 12:10 am

aData := ARRAY( nRows, nCols )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10242
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: declare array

Postby Silvio.Falconi » Mon Mar 20, 2017 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6757
Joined: Thu Oct 18, 2012 7:17 pm

Re: declare array

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests