Open "d:\523741.fig" For Binary As 1
        n = LOF(1)
        ReDim arrBytes(1 To n) As Byte
        Get 1, , arrBytes
Close 1
我想把arrBytes(1),(2),(3),(4)连成一个双字,怎么实现呢

解决方案 »

  1.   

    VB里定点数包括Byte Integer Long Currency
    只有Byte是无符号的
      

  2.   

    dim allbyte as byte(声明在通用里)for i=0 to Ubound(arrBytes) step 1
     allbyte = allbyte & arrBytes(i)
    next i
      

  3.   

    我给个例子吧:
    arrBytes(1)=&H00
    arrBytes(2)=&H07
    我想连接以后变成00 07,然后再把它转化成整数
    用copymemory好像顺序反了
    我的用法是:
    Dim intNum As Long
    CopyMemory intNum, arrBytes(1), 2
    但是它的连接是倒起来的,即:07 00,应该怎么来转换呢?
      

  4.   

    再加一个数组吧
    dim arrstr(3) byte
    arrstr(0) = arrBytes(1)
    ..
    arrstr(3) =arrBytes(4)debug.print CSTR(arrstr)