home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 July
/
Chip_2000-07_cd.bin
/
sharewar
/
prodelph
/
PROCAL2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
2000-05-01
|
2KB
|
87 lines
unit procal2;
{$O-} // Do not remove! Delphi might crash !!!!
{$R-}
{$Q-}
{$A+}
interface
USES
Windows;
TYPE
{$IFDEF VER120 }
TMyComp = Int64;
{$ELSE }
{$IFDEF VER130 }
TMyComp = Int64;
{$ELSE }
TMyComp = Comp;
{$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 FunctionWith1000( VAR index : Integer ) : TMyLargeInteger;
FUNCTION FunctionWith10000( VAR index : 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 FunctionWith10000( VAR index : Integer ) : TMyLargeInteger;
VAR
i : Integer;
BEGIN
Result.lowpart := 0;
Result.highpart := 0;
FOR i := 1 TO 10000 DO
INC(index);
END;
FUNCTION FunctionWith1000( VAR index : Integer ) : TMyLargeInteger;
VAR
i : Integer;
BEGIN
Result.lowpart := 0;
Result.highpart := 0;
FOR i := 1 TO 1000 DO
INC(index);
END;
PROCEDURE Empty;
BEGIN
END;
PROCEDURE NotUsed;
BEGIN
END;
end.