The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 findfiles and sorting array

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
peter.cook Posted - 02/27/2004 : 09:07:50 AM
Hi,

Can anyone please confirm that FindFiles will always return the file names in sorted (ascending order)?

Which leads on to the next question ... any thoughts or recommendations re sorting arrays generally - numeric, alphanumeric or text? Do we have to do our own code?

Cheers,

pete

6   L A T E S T    R E P L I E S    (Newest First)
peter.cook Posted - 03/01/2004 : 05:31:59 AM
Hi all,

Thanks for help.

I also think retrieving the original indeces is v useful.

Cheers,

pete



Edited by - peter.cook on 03/01/2004 06:04:22 AM
cpyang Posted - 02/27/2004 : 10:42:03 AM
quote:
Dataset inherits vector properties and methods so you can sort the dataset itself. Copying to vector is unnecessary.



Unfortunately, this is true only for numeric data. For strings from Text columns, you need to do copying by GetStringArray and PutStringArray.


CP


Mike Buess Posted - 02/27/2004 : 10:15:20 AM
quote:
So datasets could be copied to vectors, vectors sorted and copied back?
Dataset inherits vector properties and methods so you can sort the dataset itself. Copying to vector is unnecessary.

Mike Buess
Origin WebRing Member
hajo_old Posted - 02/27/2004 : 10:12:33 AM
Hello, Peter

Yep!

Hajo

-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1 is now hajo
peter.cook Posted - 02/27/2004 : 09:49:52 AM
Hi Mike,

Thanks. Appreciate the quick reply.
So datasets could be copied to vectors, vectors sorted and copied back?

I'm only just getting used to vectors (as opposed to datasets)!

Cheers,

pete

Mike Buess Posted - 02/27/2004 : 09:17:33 AM
Hi Pete,

StringArray is vector<string> so vectorbase::Sort should work.

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000