Results 1 to 7 of 7

Thread: the >> operator?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    the >> operator?

    Just wondering what >> means?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi MrPolite.

    This is from MSDN.

    Right shifts the bits of an expression, maintaining sign.

    result = expression1 >> expression2
    So "A = B >> 3" would shift all bits in B 3 places to the right and put the result in A.

    But apparently this is not available in VB.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by pax
    Hi MrPolite.

    This is from MSDN.



    So "A = B >> 3" would shift all bits in B 3 places to the right and put the result in A.

    But apparently this is not available in VB.
    MSDN is wrong then cuz it works funny hehe

    I guess I have to learn assembly to get a better understanding of all these byte shifts blah blah, even though they may be simple
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    It works in VB ?

    How did you do that?

    I have just tried this :
    VB Code:
    1. Dim A As Integer
    2.         A = &H10
    3.  
    4.         MsgBox(Hex(A))
    5.  
    6.         A = A >> 3
    7.  
    8.         MsgBox(Hex(A))

    And I get a compile error on the >>
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  5. #5
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780
    Its now available in VS2003 but not in VS2002.

  6. #6
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Ah, that explains it all...

    Thank's for the info, Grimfort
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  7. #7

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    heh interesting. Is there anywhere which lists all the LANGUAGE changes in VS.NET 2003?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width