FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour array into array
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
array into array
Posted: Mon Feb 23, 2015 04:50 PM

I need to insert the data of an array into another but the first array data change each skip sample :

...
Local aDchk7:= {}
Local aData:= {}

while (!DO->(EOF()))

       aData:= chk_ore( do->(RecNo()) ,  do->cognome, do->nome)   // this give me an array with ten elements

         aadd(aDchk7,{{ aData[1], aData[2],aData[3],aData[4],aData[5],aData[6],aData[7],aData[8],aData[9],aData[10] } })

         do->(dbSkip())
      enddo

the exe let me say this error

Error description: Error BASE/1132 Limiti superati: accesso all'array
Args:
[ 1] = A { ... } length: 1
[ 2] = N 2

I made also
aadd(aDchk7,{ aData[1], aData[2],aData[3],aData[4],aData[5],aData[6],aData[7],aData[8],aData[9],aData[10] }) ... same error
how I can resolve it ?

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: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: array into array
Posted: Tue Feb 24, 2015 11:07 PM

Sylvio,

Can you tell us what the chk_ore() function does? I got the idea that there is a problem in it.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: array into array
Posted: Tue Feb 24, 2015 11:41 PM

I think this is wrong. It is giving you a two element array in the 2nd location of aDchk7:

aadd(aDchk7,{{ aData[1], aData[2],aData[3],aData[4],aData[5],aData[6],aData[7],aData[8],aData[9],aData[10] } })

Try it this way:

aadd(aDchk7, aData)

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 498
Joined: Thu May 10, 2007 08:30 PM
Re: array into array
Posted: Sun Mar 08, 2015 11:15 AM

Or only:

aadd(aDchk7,{ aData[1], aData[2],aData[3],aData[4],aData[5],aData[6],aData[7],aData[8],aData[9],aData[10] } )

Peaaaaaso de foro...

FWH 2007 - xHarbour - BCC55

Continue the discussion