[fpc-devel] What happened to fexpand() ?

Marco van de Voort marcov at stack.nl
Thu Mar 3 09:39:44 CET 2005


> Is there some reason why fexpand() was removed from unix.pp ?

fexpand was in unit linux because unit dos used it, and it wasn't supposed
to be used directly. (iow fexpand and some similar routines were both in
unit unix/linux and dos).

This problem (generic functions exported via a non-generic unit because
of an internal interface) has been corrected by cleaning unit unix.

> Is it gone forever? Or maybe it is moved to another unit?

It is still in dos, and slightly different in sysutils (delphi compat). The
flavour you use is a matter of taste (and depends if you want to be more
TP compat or delphi compat).

In sysutils it is a function:
function ExpandFileName (Const FileName : string): String;

We advise to use sysutils as much as possible, since in general the sysutils
routines have less limits on path length (dos uses shortstrings, 255 char
max). Even the routines that are not 255 char clean yet (like expandfilename
:-)  at least have interface definitions that allow to improve this in the
 future.





More information about the fpc-devel mailing list