| 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 |