Subj : TP Code To : All From : Neil Santos Date : Wed Apr 24 2002 05:24 pm Captain's Log, Star Date 04-24-02 00:37 :: NEIL SANTOS said... let's try to improve on this one... === cut here ============================= NS> uses dos; NS> function ret_pathval(n : pathstr, whichone : byte) : string; NS> var sdir : dirstr; NS> name : namestr; NS> ext : extstr; NS> begin NS> fsplit(n, sdir, name, ext); NS> case whichone of NS> 1 : ret_pathval := sdir; NS> 2 : ret_pathval := name; NS> 3 : ret_pathval := ext; NS> else NS> ret_pathval := n { kindda useless, don't you think? } NS> end; NS> end; === cut here ============================= and please ignore the function i posted before this one. i was so sleepy i didn't know what i was doing (and some would say that the case is the same even when i'm awake). the `return_dir()' function will -NOT- work. i believe this one will. but no guarantees. -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS/IT/TW/S d+(-) s+: a--- C++++ ULC++>+++ P++ L-(++) E- W+++(--) N-- !o K- w++(---) O- !M-- V? PS+(+++) PE-- Y-- PGP-- t*(+++) 5-- X- R* tv+ b++>+++ DI+>+++ D--- G e>+++++ h!>++ r+ y?(**) ------END GEEK CODE BLOCK------ .... Error: Out of coffee, taglines may become irrational --- MultiMail/Win32 v0.43 * Origin: The File Bank BBS! Makati. Philippines +63-2-896-3116 (6:751/321) .