home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 January
/
Chip_2003-01_cd1.bin
/
zkuste
/
delphi
/
nastroje
/
d234567
/
PRODEL.ZIP
/
PROCAL2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
2002-07-23
|
2KB
|
87 lines
unit Procal2;
{$O-} // Do not remove! Delphi might crash !!!!
{$R-}
{$Q-}
{$A+}
interface
USES
Windows;
TYPE
{$IFDEF VER90 }
TMyComp = Comp;
{$ELSE }
{$IFDEF VER100 }
TMyComp = Comp;
{$ELSE }
TMyComp = Int64;
{$ENDIF }
{$ENDIF }
TMyLargeInteger = RECORD
CASE Byte OF
0 : ( LowPart : DWORD; HighPart : LongInt );
1 : ( QuadPart : TMyComp );
END;
PROCEDURE Empty;
FUNCTION TopFunction ( VAR index : Integer ) : TMyLargeInteger;
FUNCTION FunctionWith100( VAR index : Integer; loops : Integer ) : TMyLargeInteger;
FUNCTION FunctionWith1000( VAR index : Integer; loops : Integer ) : TMyLargeInteger;
implementation
FUNCTION DeepFunction : Integer;
BEGIN
Result := 0;
END;
FUNCTION MidFunction : Integer;
VAR
i : Integer;
BEGIN
FOR i := 1 TO 10 DO
Result := DeepFunction;
END;
FUNCTION TopFunction ( VAR index : Integer ) : TMyLargeInteger;
VAR
i : Integer;
BEGIN
FOR i := 1 TO 10 DO
index := MidFunction;
Result.lowpart := 0;
Result.highpart := 0;
END;
FUNCTION FunctionWith100( VAR index : Integer; loops : Integer ) : TMyLargeInteger;
VAR
i : Integer;
BEGIN
FOR i := 1 TO loops DO
index := index + 1;
Result.lowpart := 0;
Result.highpart := 0;
END;
FUNCTION FunctionWith1000( VAR index : Integer; loops : Integer ) : TMyLargeInteger;
VAR
i : Integer;
BEGIN
FOR i := 1 TO loops DO
index := index + 1;
Result.lowpart := 0;
Result.highpart := 0;
END;
PROCEDURE Empty;
BEGIN
END;
PROCEDURE NotUsed;
BEGIN
END;
end.