Hi, all
There have been some recent improvements to the Mersenne Twister (the random number generator that is used in the GPC unit), and I've been translating them into Pascal for eventual submission to the programming team. As part of this, I wanted to check the execution time, so I wrote a timer (I thought!) into a test program:
program testMT; uses GPC, MTrand; {MTrand is the name of the unit I'm working on} const big = 10000000; TimeFormat = ' %Q'; var t1, t2, i, j : medCard; CurrentTime : TimeStamp;
begin SeedRand(1234567890); GetTimeStamp (CurrentTime); WriteStr(FormatTime(CurrentTime, TimeFormat), t1); { line 17 } for i := 1 to big do j := randInt; GetTimeStamp (CurrentTime); WriteStr(FormatTime(CurrentTime, TimeFormat), t2); Writeln('Elapsed time: ', (t2 - t1):1); end.
The compiler hangs with the following error: testmt.pas(17): Error: reference expected, value given testmt.pas(17): Error: reference expected, value given testmt.pas(17): Error: tree check: expected class 't', have 'x' (error_mark) in require_complete_type, at p/typecheck.c:63 Please submit a full bug report
I'm guessing that it's not about my unit, but rather what I'm trying to do with capturing a string into an int... anyway, here is a bug report.
Toby