`
Par2: FNSplit example 2000-01-06 -- Jim Kane > I need to use the runtime library function fnsplit( ) > If ~FILEDIALOG( 'Select a File' ,Prx:localfilepath, ,10B ) then cycle. cPath=clip(prx:localfilepath) fnsplit(cpath,cdrive,cdir,cname,cext) prx:filename = cname & cext Display(?prx:filename) each cstring component, drive,dir,name,ext is left with colon or slashes such that you can just concat to make it whole again. Arnor Baldvinsson adds: Here is how I do it: Loc:Path Cstring(256) Loc:Drive Cstring(256) Loc:Dir Cstring(256) Loc:File Cstring(256) Loc:Ext Cstring(256) Loc:Ret Long Copy this into a data embed or into the data button, Loc:Ret = FnSplit(Loc:Path,Loc:Drive,Loc:Dir,Loc:File,Loc:Ext) That's pretty much it. Oh, and these functions are documented in the C/C++ manuals that come with Clarion (in pdf format on your cd) Printed November 21, 2024, 7:26 am This article has been viewed/printed 35308 times. |