[fpc-pascal]no refcounted interfaces

2004-04-08 Thread Dean Zobec
I've talked with some friends of mine about the use of Interface base classes without reference counting in Delphi like this type TNoRefCount = class(TObject, IUnknown) protected function QueryInterface(const IID:TGUID; out Obj):HResult; stdcall; function _AddRef: Integer; stdcall;

Re: [fpc-pascal]Conditional compilation ELSE-IF?

2004-04-08 Thread Peter Vreman
> --- Peter Vreman <[EMAIL PROTECTED]> wrote: >> {$if defined(linux)} >> Slash:='/' >> {$elseif defined(win32)} >> Slash:='\' >> {$elseif defined(macos)} >> Slash:=':' >> {$else} >> {$error Unsupported target} >> {$endif} >> >> Better is to use PathSeparator from the System unit > > Thanks

Re: [fpc-pascal]Conditional compilation ELSE-IF?

2004-04-08 Thread Alan Mead
--- Peter Vreman <[EMAIL PROTECTED]> wrote: > {$if defined(linux)} > Slash:='/' > {$elseif defined(win32)} > Slash:='\' > {$elseif defined(macos)} > Slash:=':' > {$else} > {$error Unsupported target} > {$endif} > > Better is to use PathSeparator from the System unit Thanks to everyone who

Re: [fpc-pascal]Conditional compilation ELSE-IF?

2004-04-08 Thread Marco van de Voort
> I have the following code in a function: > > {$IFDEF LINUX} Should be {$ifdef unix} > Slash := '/'; > {$ENDIF} > {$IFDEF WIN32} > Slash := '\'; > {$ENDIF} > > Obviously, FPC supports many other platforms. Is there a better way > to handle this? See other

Re: [fpc-pascal]Conditional compilation ELSE-IF?

2004-04-08 Thread Michalis Kamburelis
Alan Mead wrote: I have the following code in a function: {$IFDEF LINUX} Slash := '/'; {$ENDIF} {$IFDEF WIN32} Slash := '\'; {$ENDIF} Obviously, FPC supports many other platforms. Is there a better way to handle this? Use DirectorySeparator constant from Syst

Re: [fpc-pascal]Conditional compilation ELSE-IF?

2004-04-08 Thread Peter Vreman
> I have the following code in a function: > > {$IFDEF LINUX} > Slash := '/'; > {$ENDIF} > {$IFDEF WIN32} > Slash := '\'; > {$ENDIF} > > Obviously, FPC supports many other platforms. Is there a better way > to handle this? Also, will this work if I ever cross-c

[fpc-pascal]Conditional compilation ELSE-IF?

2004-04-08 Thread Alan Mead
I have the following code in a function: {$IFDEF LINUX} Slash := '/'; {$ENDIF} {$IFDEF WIN32} Slash := '\'; {$ENDIF} Obviously, FPC supports many other platforms. Is there a better way to handle this? Also, will this work if I ever cross-compile? Is there a w