08-16-2024, 11:33 PM
While youse guys are studying cause and effect, I've been experimenting with the DefInt function, and I don't understand the results.
The DefInt function truncates all variables of that name to their integer values, and they then operate with this integer value, right?
But why do I get the Inf result in this snippet? I guess it's to do with their binary expression?
t1 and t2 are "simple" integers aren't they?
The DefInt function truncates all variables of that name to their integer values, and they then operate with this integer value, right?
But why do I get the Inf result in this snippet? I guess it's to do with their binary expression?
t1 and t2 are "simple" integers aren't they?
Code: (Select All)
DefInt T
t1 = Timer
Print "T1 is integer. ", , , t1
Sleep 2
ActOnT
Sub ActOnT
t2 = Timer
Print "t2 is integer in sub. ", , , t2
t3 = t1 / t2
Print "t3 is result of t1 divided by t2, I expect 0. ", t1 / t2
t4 = t2 / t1
Print "t4 is result of t2 divided by t1, I expect 1. ", t2 / t1
End Sub
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/