Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I also have a question - about DefInt
#1
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?
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.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply


Messages In This Thread
I also have a question - about DefInt - by PhilOfPerth - 08-16-2024, 11:33 PM



Users browsing this thread: 1 Guest(s)