I'm not sure if this is a bug, so feel free to move this report somewhere more appropriate.
In "PROGRAM\calendar.c", 'SetCurrentTime' is defined thus:
So if I want to set the time to 11:00 plus a random number of minutes, this should do it, right?
Wrong. That sets the time to 11:00, consistently. On the other hand:
does the job. You'd think that would either generate an error (giving a floating point value to an integer argument) or consistently return 11:00 ('minutes' set to 0), but in fact this is the code which generates random times for me.
Is there another definition of 'SetCurrentTime' somewhere which uses a floating point for 'hour' and disregards 'minute'? Otherwise, why does giving it a floating point 'hour' work and why does giving it an integer 'minute' not work?
In "PROGRAM\calendar.c", 'SetCurrentTime' is defined thus:
Code:
void SetCurrentTime(int hour, int minutes)
Code:
cc = rand(59);
SetCurrentTime(11, cc);
Code:
cc = rand(99);
SetCurrentTime(11.0 + cc/100.0, 0);
Is there another definition of 'SetCurrentTime' somewhere which uses a floating point for 'hour' and disregards 'minute'? Otherwise, why does giving it a floating point 'hour' work and why does giving it an integer 'minute' not work?