Angus Robertson - Magenta Systems Ltd wrote: >> You could probably simply overload GetFileSize() and DecodeMlsResp() >> as well. > > Was overloading supported in Delphi 1?
No idea, however you could also move condional compilation into the various helper functions some like the untested lines below. type {$IFDEF COMPILER6_UP} BigInt = Int64; {$ELSE} BigInt = LongInt; {$ENDIF} function GetFileSize(const FileName : String) : BigInt; var SR : TSearchRec; {$IFNDEF COMPILER6_UP} TempSize: TULargeInteger ; // 64-bit integer record {$ENDIF} begin {$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} if FindFirst(FileName, faReadOnly or faHidden or faSysFile or faArchive, SR) = 0 then {$IFDEF COMPILER6_UP} TempSize.LowPart := SearchRec.FindData.nFileSizeLow; TempSize.HighPart := SearchRec.FindData.nFileSizeHigh; Result := TempSize.QuadPart; {$ELSE} Result := SR.Size {$ENDIF} else Result := -1; FindClose(SR); {$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} end; > I can justify time moving the components forward with new features, but > not trying to keep them compatible with obsolete compilers I stopped > using five years ago - and I still use Delphi 6 for production code. So Delphi 5 is obsolete? I don't believe that, there are many people still using it. In this certain case support for older compilers is no problem. Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be