lazarus/lcl/fpcadds.pas
mattias ccec99fefc small clean ups
git-svn-id: trunk@5519 -
2004-05-29 10:09:42 +00:00

59 lines
1.7 KiB
ObjectPascal

{ $Id$ }
{
/***************************************************************************
FPCAdds.pas
-----------
***************************************************************************/
*****************************************************************************
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.LCL, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
}
unit FPCAdds;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
// current TStream calculates in int64, old in longint
type
TStreamSeekType = int64;
TMemStreamSeekType = integer;
TCompareMemSize = integer;
{$IFDEF VER1_0}
PCardinal = ^Cardinal;
{$ENDIF}
function StrToWord(const s: string): word;
implementation
function StrToWord(const s: string): word;
var
p: Integer;
begin
Result:=0;
p:=1;
while (p<=length(s)) do begin
Result:=Result*10+ord(s[p])-ord('0');
inc(p);
end;
end;
end.