VB6 overflow error with large integers

前端 未结 3 1124
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-12 10:57

I am trying to set an integer value as such:

Dim intID as integer
intID = x * 10000

This works ok when x is 3 or less. But when

3条回答
  •  有刺的猬
    2021-02-12 11:41

    in VB6, the Integer type is a whole number which ranges from -32768 to 32767.

    You would be best using the Long type here.

提交回复
热议问题