On Wed, 3 Mar 2004, Frank Heckenbach wrote:
[..]
program testMT; uses GPC; const big = 10000000; TimeFormat = ' %Q'; var t1, t2, i, j : medCard; CurrentTime : TimeStamp;
begin GetTimeStamp (CurrentTime); WriteStr(FormatTime(CurrentTime, TimeFormat), t1); { line 17 } { WRONG } for i := 1 to big do j := randInt; GetTimeStamp (CurrentTime); WriteStr(FormatTime(CurrentTime, TimeFormat), t2); Writeln('Elapsed time: ', (t2 - t1):1); end.
If I change the first writestr like so:
var s : string[30]; ... s := FormatTime(CurrentTime, TimeFormat); writestr( s, t1 ); ...
Two of the original errors went away:
frank.pas: In main program: frank.pas:14: error: undeclared identifier `randInt' (first use in this routine) frank.pas:14: error: (Each undeclared identifier is reported only once frank.pas:14: error: for each routine it appears in.) frank.pas:16: error: reference expected, value given frank.pas:16: error: reference expected, value given
Is line 16 a bug? And where would I find 'randInt' ?
Russ