> How do I get removed from this list?
>
> ___
> fpc-pascal maillist - fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
There is an URL appended to each post? :-)
__
How do I get removed from this list?
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
|
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.
|
On Thu, 14 Jul 2005, L505 wrote:
>
>
> | 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 ima
On Thu, 14 Jul 2005, L505 wrote:
> Could someone tell me the way forward and backward slashes are handled easily?
>
> For example this is sort of code bloat below
> Is there some way around this:
>
> {$ifdef unix}
> path:= ExtractFileDir(paramstr(0)+'/somepath/directory/etc/';
Path:=ExtractFi
>
> 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?
>
Not sure which unit it's from, sysutils I think, but there is a predeclared
constant PATHDELIM which auto-adjusts for t
| 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
#x27;s units already has something very similar to
this.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of L505
Sent: Thursday, July 14, 2005 1:33 PM
To: FPC-Pascal users discussions
Subject: [fpc-pascal] Paths on different OS's
Could someone tell me the way forwar
Could someone tell me the way forward and backward slashes are handled easily?
For example this is sort of code bloat below
Is there some way around this:
{$ifdef unix}
path:= ExtractFileDir(paramstr(0)+'/somepath/directory/etc/';
{$ifdef win32}
path:= ExtractFileDir(paramstr(0)+'\somepath\direc