Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array Conundrum
Message
De
12/04/2005 12:50:48
 
 
À
12/04/2005 12:44:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01003455
Message ID:
01003848
Vues:
18
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"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform