Checking Bit of a Byte using another variable


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Thanks Bruce, the topics have really been helpful.
    After reading them, I still have one question (Just want to confirm)

    Please correct me if I am wrong :

    Check=[bit7,bit6,bit5,bit4,bit3,bit2,bit1,bit0]

    To access bit7 of Check variable (byte) : Should it be
    Check.0[days] ; Days =7 in this example

    Similarly :

    To access bit1 of Check variable (byte) : Should it be
    Check.0[days] ; Days =1 in this example
    ___________________
    WHY things get boring when they work just fine?

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Yep that will work.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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