Equivalent for VB6

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mazant, K.

    #1

    Equivalent for VB6

    Can someone indicate the equivalent for VB6 on the following statements?


    Dim t As Long = ((r Xor X) >2) '=???

    t >>= 1 '=???

    x = x Or (1L << j) '=???




    TIA,

  • Mattias Sjögren

    #2
    Re: Equivalent for VB6

    >Can someone indicate the equivalent for VB6 on the following statements?
    >
    >
    >Dim t As Long = ((r Xor X) >2) '=???
    Long in VB.NET is a 64-bit integer, which doesn't exist. So all the
    following is based on the VB6 32-bit Long type instead.

    Dim t As Long
    t = (r Xor X) \ 4

    >t >>= 1 '=???
    t = t \ 2

    >x = x Or (1L << j) '=???
    x = x Or 2 ^ j


    Mattias

    --
    Mattias Sjögren [C# MVP] mattias @ mvps.org
    http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
    Please reply only to the newsgroup.

    Comment

    • Mazant, K.

      #3
      Re: Equivalent for VB6

      Mattias Sjögren wrote:
      >Can someone indicate the equivalent for VB6 on the following statements?
      >>
      >>
      >Dim t As Long = ((r Xor X) >2) '=???
      >
      Long in VB.NET is a 64-bit integer, which doesn't exist. So all the
      following is based on the VB6 32-bit Long type instead.
      >
      Dim t As Long
      t = (r Xor X) \ 4
      >
      >
      >t >>= 1 '=???
      >
      t = t \ 2
      >
      >
      >x = x Or (1L << j) '=???
      >
      x = x Or 2 ^ j
      >
      >
      Mattias
      >

      Thank you Mattias,

      Comment

      Working...