Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need idea for sort
Message
De
26/02/2010 04:58:57
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
26/02/2010 04:41:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01451160
Message ID:
01451165
Vues:
81
>Not enough info.
> For example - what number does '1.10.R.1' represent?
>1 ? 1.10 ? 110 ? 1101 ? 1.101 ? ???
>Will the alpha part have *any* significance ?

Hi Viv

its not a number (that would be to easy)

For further discussion:
We will count any section separated by a point a word

Imagine version info as you get with VERSION(4). This contains out of 4 words

so I have to order first by the leftmost, then by the next to the right and so on

Only that somebody skips the leading 0 sometimes and the number of words my change from 1 up to len()/2
And he mix up with letters that have there own meaning.
The number of words alters from record to record

This is a code to number something.

So one word means something in it's basic style,
-two words, all digits means something inserted between one word sorts by the needs of operation
original 1 , 2 , 3 now 1 , 2.1 , 2.2 , 3
-two words, second word start with 'N' means means something inserted between one word sorts by the needs of design
original 1 , 2 , 3 now 1 , 2 , 2.N , 3
-two words, second word start with 'R' means means something inserted between one word sorts by the needs of repair
original 1 , 2 , 3 now 1 , 2 , 2.R , 3

so this goes on like

-three words, second word start with 'R' means means something inserted between one word sorts by the needs of repair, but it need to be separated by needs of operation.
original 1 , 2 , 3 now 1 , 2 , 2.R.1 , 2.R.2 , 3

so I think I need to order everyword first to the numerics followed by the alphas.

I can do this with some loops and sorting this with some IFs but I look for a fast and clever way.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform