Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Procedure for locating nearest site on X & Y Axis
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00539725
Message ID:
00541476
Vues:
13
Sorry if its scruffy but the method I would use is to add a numeric field z to the table that holds x and y. Index on z and make the index active. Move to the record from which you want to start then :-
SCATTER MEMVAR MEMO
REPLACE ALL z WITH (x-M.x)^2 + (y-M.y)^2
Voila! The table is in distance order according to Pythagoras. Or perhaps I've missed something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform