VB.NET ULong overflow -


I have a timer that has passed the time:

  public function time-aligned () ULong Dim ul ULong ul = m_lend - m_lStart um Ul 2 as Ulol UL2 = UL - M_Loverhead Deam UL 3 Ulolong UL3 = (UL2 / M_LifeEk) * 1000 Inverted UL 3 End Function  

I have now experienced the following variables:

  m_lEnd = 935083366402 m_lStart = 935007142800 ul2 = 76223588 m_lOverhead = 14  

Returns an overflow

<<> ul3 = (ul2 / m_lFreq) * 1000

Why me A. How could not see how to improve your bug.

Thank you very much for you!

You should clearly tell the compiler that you are operating on the UOL ... The reason for this is that numerical literals default on Integers , so you are trying to use an integer literal which is your overflow like your issue You can apply different types of values ​​with the correct suffix. In a meaningful value without a type of suffix, value can only be worth to the extent of long; in this situation it is Ulong , hence the suffix is: ul.

By the way, it is a conversion error, turn on the option to tighten ...

  EX: Dim M_lind as ulong = 935083366402UL  

Finally notice this, it is necessary to do this.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -