|
Path:=ExtractFileDir(ParamStr(0)+PathDelim+'SomePath'+PatHDelim+'Directory'+PatH
Delim+'etc'+PathDelim;
|
| Is cross platform, or
|
|
Path:=ExtractFileDir(SetDirSeparators(paramstr(0)+'\somepath\directory\etc\'));
|
| DoDirSeparators is the same as SetDirSeparators, but operates on a var param.
|
| All these functions are in sysutils, and are documented.
|

Thanks, I remember coming across them in the docs somewhere before!
The second example you mentioned might be easier on the eyes in the source code.
A little extra CPU, but oh well.


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to