Thread: switch(hexvalue???)

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    17

    switch(hexvalue???)

    Dear all,

    can i use hex value with switch() statement??
    eg:-

    variable1; // 2 byte hexvalue

    switch(variable1)
    {
    case 0x0000:

    case 0x0001:

    }

    thanks
    cool

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Yes. You really should try things on your own. It's amazing what you can learn...

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    Posts
    362
    >>can i use hex value with switch() statement??
    Yes, hex literals count as an integral constant in most circles...like the world. :-)
    *Cela*

Popular pages Recent additions subscribe to a feed