module SysFunc;

definition

type
  TDateTime = double;

  function ShowMessage(S1: string);
  function IntToStr(I1: integer): string;
  function StrToInt(S1: string): Integer;
  function StrToIntDef(S1: string; Default: Integer): Integer;
  function StrToFloat(S1: string): Extended;
  function FloatToStr(E1: extended): string;
  function Copy(S1: string; Index,Count: integer): string;
  function Delete(var S1: string; Index, Count:Integer);
  function Insert(Source: string; var S1: string; Index: integer);
  function Length(S1: string): Integer;
  function Pos(Substr: string; S1: string): Integer;
  function Compare(S1, S2: string): Integer;
  function CompareCase(S1,S2: string): Integer;
  function Trim(S1: string): string;
  function TrimLeft(S1: string): string;
  function TrimRight(S1: string): string;
  function MakeStr(Ch: char; Count: integer): string;
  function UpperCase(S1: string): string;
  function LowerCase(S1: string): string;
  function Chr(X: byte): char;
  function CurrToStr(Value: currency): string;
  function StrToCurr(S1: string): currency;
  function DateTimeToStr(DateTime: TDateTime): string;
  function StrToDateTime(S1: string): TDateTime;
  function DateToStr(Date: TDateTime): string;
  function StrToDate(S1: string): TDateTime;
  function TimeToStr(Time: TDateTime): string;
  function StrToTime(S1: string): TDateTime;
  function Abs(X: integer): integer;
  function AbsExt(X: extended): extended;
  function ArcTan(X: extended): extended;
  function Cos(X: extended): extended;
  function Sin(X: extended): extended;
  function Exp(X: extended): extended;
  function Frac(X: extended): extended;
  function Ln(X: extended): extended;
  function Round(X: extended): integer;
  function Trunc(X: extended): integer;
  function Odd(X: integer): boolean;
  function Pi: extended;
  function Random(Range: integer): integer;
  function Randomize;
  function Sqr(X: extended): extended;
  function Sqrt(X: extended): extended;
  function Beep;
  function Date: TDateTime;
  function DayOfWeek(Date: TDateTime): integer;
  function BreakupDate(Date: TDateTime; var Year, Month, Day: word);
  function BreakupTime(Time: TDateTime; var Hour, Min, Sec, MSec: word);
  function CreateDate(Year, Month, Day: word): TDateTime;
  function CreateTime(Hour, Min, Sec, MSec: word): TDateTime;
  function Now: TDateTime;
  function QuotedStr(Value: string; Quote: char): string;
  function FormatFloat(Format: string; Value: extended): string;

var
  nil: TClass;

implementation

  function ShowMessage(S1: string); external;
  function IntToStr(I1: integer): string; external;
  function StrToInt(S1: string): Integer; external;
  function StrToIntDef(S1: string; Default: Integer): Integer; external;
  function StrToFloat(S1: string): Extended; external;
  function FloatToStr(E1: extended): string; external;
  function Copy(S1: string; Index,Count: integer): string; external;
  function Delete(var S1: string; Index, Count:Integer); external;
  function Insert(Source: string; var S1: string; Index: integer); external;
  function Length(S1: string): Integer; external;
  function Pos(Substr: string; S1: string): Integer; external;
  function Compare(S1, S2: string): Integer; external; // Result := CompareText(S1,S2);
  function CompareCase(S1,S2: string): Integer; external; // Result := CompareStr(S1,S2);
  function Trim(S1: string): string; external;
  function TrimLeft(S1: string): string; external;
  function TrimRight(S1: string): string; external;
  function MakeStr(Ch: char; Count: integer): string; external; // Result:=StringOfChar(Ch,Count);
  function UpperCase(S1: string): string; external;
  function LowerCase(S1: string): string; external;
  function Chr(X: byte): char; external;
  function CurrToStr(Value: currency): string; external;
  function StrToCurr(S1: string): currency; external;
  function DateTimeToStr(DateTime: TDateTime): string; external;
  function StrToDateTime(S1: string): TDateTime; external;
  function DateToStr(Date: TDateTime): string; external;
  function StrToDate(S1: string): TDateTime; external;
  function TimeToStr(Time: TDateTime): string; external;
  function StrToTime(S1: string): TDateTime; external;
  function Abs(X: integer): integer; external;
  function AbsExt(X: extended): extended; external; // Result:=Abs(X);
  function ArcTan(X: extended): extended; external;
  function Cos(X: extended): extended; external;
  function Sin(X: extended): extended; external;
  function Exp(X: extended): extended; external;
  function Frac(X: extended): extended; external;
  function Ln(X: extended): extended; external;
  function Round(X: extended): integer; external;
  function Trunc(X: extended): integer; external;
  function Odd(X: integer): boolean; external;
  function Pi: extended; external;
  function Random(Range: integer): integer; external;
  function Randomize; external;
  function Sqr(X: extended): extended; external;
  function Sqrt(X: extended): extended; external;
  function Beep; external;
  function Date: TDateTime; external;
  function DayOfWeek(Date: TDateTime): integer; external;
  function BreakupDate(Date: TDateTime; var Year, Month, Day: word); external; // DecodeDate(Date,Year,Month,Day);
  function BreakupTime(Time: TDateTime; var Hour, Min, Sec, MSec: word); external; // DecodeTime(Time,Hour,Min,Sec,MSec);
  function CreateDate(Year, Month, Day: word): TDateTime; external; // Result:=EncodeDate(Year,Month,Day);
  function CreateTime(Hour, Min, Sec, MSec: word): TDateTime; external; // Result:=EncodeTime(Hour,Min,Sec,MSec);
  function Now: TDateTime; external;
  function QuotedStr(Value: string; Quote: char): string; external; // Result:=AnsiQuotedStr(Value,Quote);
  function FormatFloat(Format: string; Value: extended): string; external;

end SysFunc;