Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array Conundrum
Message
From
12/04/2005 12:50:48
 
 
To
12/04/2005 12:44:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01003455
Message ID:
01003848
Views:
16
Very cool. Thank you Fabio. I like your solution much more than the one I came up with.

Thanks again!

>Tracy, you can use this:
>
>PUBLIC myarray
>dimension myarray(8,30)
>FOR k=1 TO ALEN(myarray,1)
> FOR j=1 TO ALEN(myarray,2)
>    myarray[k,j]="Driver"+TRANSFORM(k)+" Violation"+TRANS(j)
> NEXT
>NEXT
>
>A_AddColumns(@m.myarray,10,"")
>LIST MEMORY LIKE "myarray"
>
>PROCEDURE A_AddColumns(aArray,columnsToAdd,fillValue)
>PRIVATE old_ColumnCount , iRow, aBlank
>
>old_ColumnCount = ALEN(aArray,2)
>
>DIMENSION aArray(ALEN(aArray,1),m.old_ColumnCount+m.columnsToAdd),aBlank(m.columnsToAdd)
>aBlank = m.fillValue
>=ACOPY(aBlank,aArray,1,-1, 1 + ALEN(aArray) - m.columnsToAdd)
>FOR iRow=ALEN(aArray,1)-1 TO 1 STEP -1
>	=ACOPY(aArray,aArray,1 + m.iRow * m.old_ColumnCount ,m.old_ColumnCount,1 + m.iRow * ALEN(aArray,2));
>	,ACOPY(aBlank,aArray,1,-1,1 + m.iRow * ALEN(aArray,2) - m.columnsToAdd)
>NEXT
>
>ENDPROC
>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform