#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    73
    Rep Power
    11

    question regarding #define statement


    hi
    i was going through some source code and came accross this define statement #define FL_FROZEN(1<<12) . does this mean that FL_FROZEN can have any value between 1 and 12?

    thanks for your time
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    55
    Rep Power
    11
    it means FL_FROZEN as the value (binary):
    0001 0000 0000 0000 (broken into nibbles for clarity)
    as you can see, 1 has been shifted left 12 places, which is exactly what the left shift bitwise operation, <<, is meant to do.

IMN logo majestic logo threadwatch logo seochat tools logo