[fpc-pascal] Paths on different OS's

L505 fpc505 at z505.com
Thu Jul 14 20:52:59 CEST 2005



| I always do something like this:
|
| {$ifdef UNIX}
| const dirsep = '/';
| {$else}
| const dirsep = '\';
| {$endif}
|
| path := ExtractFileDir(paramstr(0) + dirsep + 'somepath' + dirsep +
| 'directory' + 'etc' + dirsep);
|
| Id imagine that one of fpc's units already has something very similar to
| this.

That's a good tip.. Yeah, so if anyone knows.. is there something like this
already in a unit somewhere that should be used as a standard directory
separator variable?







More information about the fpc-pascal mailing list