问题:
Dim a As Integer = 10 
Dim b As Integer = 8  
Dim c As Integer = 6  
Dim d as integer = 5
Dim e as integer = 45
Dim firstData1,firstData2 ,firstData3 As IntegerfirstData1 = a xor bfirstData2 = firstData1 xor cfirstData3 =firstData2 xor d我试过了,结果是错误的.请问大家能不能帮是实现该功能? 在此谢谢了...... 

解决方案 »

  1.   

    Dim firstData1,firstData2 ,firstData3 As Integer 
    只有最后一个是INTEGER类型了,强两个都是无类型.
      

  2.   

    该方法不能实现,是不是vb xor 无法连续异或呀, 谁有更好的办法吗?
      

  3.   

    (firstData1,firstData2,firstData3) 分别为 (2, 4, 1),你期待什么值。又:VB.Net 请到这里 http://forum.csdn.net/SList/VBDotNET/
      

  4.   

    Dim a As Integer = 10 
    Dim b As Integer = 8  
    Dim c As Integer = 6  
    Dim d as integer = 5 
    Dim e as integer = 45 
    =====================
    变量可以在声明时初始化,在vb6中是不可以的,以上应该是vb.net的代码吧。
      

  5.   

    问题: 
    Dim a As Integer
    Dim b As Integer 
    Dim c As Integer 
    Dim d as integer 
    Dim e as integer  
    Dim firstData1,firstData2 ,firstData3 As Integer 
    a=10
    b=8
    c=6
    d=5
    e=45firstData1 = a xor b firstData2 = firstData1 xor c firstData3 =firstData2 xor d 不好意思,定义错了 。我要连续异或,每次异或后的结果在和下一个数据异或直到数据异或完毕。我异或后的答案不对,请教各位高手帮帮忙.
      

  6.   

    不见得吧,和进制有关系吗?
    a=&HA
    b=&H8
    ..
    你试试,答案一样不?是你把其它进制的数当10进制来处理了