w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
What's does it mean of" /* overloaded elements data types */ #define OE_IS_ARRAY (1<<0) #define OE_IS_OBJECT (1<<1) #define OE_IS_METHOD (1<<2)"?

This is usually used to make it unambiguous that you're talking about bit flags. 1, 2, and 4 will make most programmers realize that we're talking about a sequence of powers of 2; not everyone will instantly know that 1<<14 is 16384. The compiler will do these computations for you, so it will not slow the program down. It's all about clarity.

You'll sometimes also see these things written in hexadecimal, because that maps more closely to the underlying binary representation than decimal constants and can be more compact.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.