home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol6n20.zip
/
FIGURES.ZIP
/
FIGURE.2
< prev
next >
Wrap
Text File
|
1987-10-16
|
438b
|
21 lines
PROGRAM Test_Length;
CONST Reps = 10000;
VAR
S : string[255];
B : byte;
N : integer;
{$I timer.inc}
BEGIN
timer(on);
FOR N := 1 to reps DO B := length(S);
timer(off);
Write(reps,' repetitions of "length(S)" took ');
WriteLn(time:1:2,' seconds');
timer(on);
FOR N := 1 to reps DO B := ord(S[0]);
timer(off);
Write(reps,' repetitions of "ord(S[0])" took ');
WriteLn(time:1:2,' seconds');
END.