如题,谢谢大家了!
4 个解决方案
#1
不过会有溢出的,因为在VB和Java中Long型的表示范围是不同的,一个占用32位,一个是64位
dim longarray() as long
longarray = Array(CInt(&H4BD8), CInt(&H4AE0), CInt(&HA570), CInt(&H54D5), CInt(&HD260), CInt(&HD950), CInt(&H16554), CInt(&H56A0), CInt(&H9AD0), CInt(&H55D2), CInt(&H4AE0), CInt(&HA5B6), CInt(&HA4D0), CInt(&HD250), CInt(&H1D255))
dim longarray() as long
longarray = Array(CInt(&H4BD8), CInt(&H4AE0), CInt(&HA570), CInt(&H54D5), CInt(&HD260), CInt(&HD950), CInt(&H16554), CInt(&H56A0), CInt(&H9AD0), CInt(&H55D2), CInt(&H4AE0), CInt(&HA5B6), CInt(&HA4D0), CInt(&HD250), CInt(&H1D255))
#2
vb里的长整数用long来表示,占4字节,等同于java的int型,不能完全表示java里的long型(8字节)
#3
那如何去定义呢?
#4
dim longarray(0 to 14) as long
longarray( 0) = &h04bd8&
longarray( 1) = &h04ae0&
longarray( 2) = &h0a570&
longarray( 3) = &h054d5&
longarray( 4) = &h0d260&
longarray( 5) = &h0d950&
longarray( 6) = &h16554&
longarray( 7) = &h056a0&
longarray( 8) = &h09ad0&
longarray( 9) = &h055d2&
longarray(10) = &h04ae0&
longarray(11) = &h0a5b6&
longarray(12) = &h0a4d0&
longarray(13) = &h0d250&
longarray(14) = &h1d255&
#1
不过会有溢出的,因为在VB和Java中Long型的表示范围是不同的,一个占用32位,一个是64位
dim longarray() as long
longarray = Array(CInt(&H4BD8), CInt(&H4AE0), CInt(&HA570), CInt(&H54D5), CInt(&HD260), CInt(&HD950), CInt(&H16554), CInt(&H56A0), CInt(&H9AD0), CInt(&H55D2), CInt(&H4AE0), CInt(&HA5B6), CInt(&HA4D0), CInt(&HD250), CInt(&H1D255))
dim longarray() as long
longarray = Array(CInt(&H4BD8), CInt(&H4AE0), CInt(&HA570), CInt(&H54D5), CInt(&HD260), CInt(&HD950), CInt(&H16554), CInt(&H56A0), CInt(&H9AD0), CInt(&H55D2), CInt(&H4AE0), CInt(&HA5B6), CInt(&HA4D0), CInt(&HD250), CInt(&H1D255))
#2
vb里的长整数用long来表示,占4字节,等同于java的int型,不能完全表示java里的long型(8字节)
#3
那如何去定义呢?
#4
dim longarray(0 to 14) as long
longarray( 0) = &h04bd8&
longarray( 1) = &h04ae0&
longarray( 2) = &h0a570&
longarray( 3) = &h054d5&
longarray( 4) = &h0d260&
longarray( 5) = &h0d950&
longarray( 6) = &h16554&
longarray( 7) = &h056a0&
longarray( 8) = &h09ad0&
longarray( 9) = &h055d2&
longarray(10) = &h04ae0&
longarray(11) = &h0a5b6&
longarray(12) = &h0a4d0&
longarray(13) = &h0d250&
longarray(14) = &h1d255&