Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link 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)
Today is November 21, 2024, 7:12 am This article has been viewed 35308 times.
|
|