built-in native code in calctime():
Code: Select all
inputs: RefTime( numericsimple ), MinuteChange( numericsimple ) ;
CalcTime = MinutesToTime( TimeToMinutes( RefTime ) + MinuteChange ) ;
Code: Select all
once begin
print(TimeToMinutes(0845)+15, MinutesToTime(TimeToMinutes(0845)+15), MinutesToTime(540));
end;
540.00 860.00 900.00
I found the problem is within MinutesToTime(), then I dig in and tried the following code:MinutesToTime(TimeToMinutes(0845)+15) gets 8 hours and 60 minutes instead of 9 hours.
Code: Select all
variables: var0( 0 ), var1( 1 / 60 ), var2( 0 ) ,var3( 0 ), var4( 0 );
once begin
var4 = TimeToMinutes(0845)+15;
print(var4 * var1);
print(IntPortion( var4 * var1 ));
end;
9.00
8.00
it seems a issue of IntPortion()
i had installed MC14 R10
i try to downgrading mc version from R10 to R4, but R4 can't duplicate this issue...
Is there a technician here who can explain this?