Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array Conundrum
Message
De
12/04/2005 12:44:47
 
 
À
12/04/2005 09:31:39
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:
01003842
Vues:
36
This message has been marked as a message which has helped to the initial question of the thread.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform