Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find max value in array
Message
De
31/03/2006 19:09:55
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
31/03/2006 12:52:41
Reza Meamar
Homa Programming Group
Shiraz, Iran
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01109569
Message ID:
01109704
Vues:
19
>>>Hi all,
>>>I have an array MyArray(100,5)
>>>I want to search for maximum value in column 2 in MyArray
>>>What is the best way to do this?
>>>Thanks for your help
>>
>>acopy(myArray,aTemp)
>>asort(aTemp,2,-1,1)
>>luMax = aTemp[2]
>>
Cetin
>
>Thanks dear Cetin
>I know about ASORT() but i dont understand it.
>Can you explain you code for me?
>Thanks again

You have to see it. Create an array (use any of the array creating functions - like adir() or afields()), and try sorting it this way or another. Watch the array in the debugger and see how elements are laid out after each sort. Try out various parameters, just to see whether you understood what help says.

That's the only proper way to learn this, believe me. Been there...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform