Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Traversing an array differently than from top down
Message
De
24/07/2007 16:52:06
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
24/07/2007 16:35:05
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01243286
Message ID:
01243294
Vues:
28
This message has been marked as the solution to the initial question of the thread.
Got it:
FOR yy = 1 TO max_room
	FOR xx = 1 TO n_lines
		WAIT WINDOW "Next slot: " + 'Line ' + ALLTRIM(STR(xx)) + ' - ' + 'Room ' + ALLTRIM(STR(yy)) + ' : ' + ALLTRIM(STR(x_room( xx, yy )))
	ENDFOR
ENDFOR
>The x_room array displays like the following with each line grouped together by the four columns:
>
>
>(Line,Room)
>
>(1,1)
>(1,2)
>(1,3)
>(1,4)
>(2,1)
>.
>.
>.
>(25,4)
>
>
>I want to move through it like this so all the rooms are in order of groups of 25:
>
>
>(Line,Room)
>
>(1,1)
>(2,1)
>(3,1)
>(4,1)
>(5,1)
>.
>.
>.
>(25,1)
>(1,2)
>(2,2)
>(3,2)
>(4,2)
>(5,2)
>.
>.
>.
>(25,2)
>.
>.
>.
>
>
>This is the basic code that goes through it currently:
>
>
>FOR yy = 1 TO max_room
>	FOR xx = 1 TO n_lines
>		WAIT WINDOW "Next slot: " + ALLTRIM(STR(x_room( xx, yy )))
>	ENDFOR
>ENDFOR
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform