![]() |
a few questions about C++ source code
Hello,
I have before my eyes source code, but I Can't understand certain parts of it: 1. #pragma - what does it mean, is it some directive for precompilator?. for example: what does it mean - #pragma resource "*.dfm;" or or #pragma package (smart_init);?. 2. what does word __fastcall mean in expression int __fastcall ABC:SetABC() {}; 3. what does expression: k = 1 << i; mean?. 4. what is the effect of running following line of text: SignalForm->CheckBox20->Enabled = (maskIO & 0x08) ? true : false; I particularly mean expression in parenthesis: (maskIO & 0x08) what does it mean?. Shouldn't there be applied bit conjunction operator?. Thank You for answer. |
Re: a few questions about C++ source code
#pragma is a preprocessor directive that speaks directly to the implementation,
such as the compiler or linker, or possibly the IDE. Check your documentation. __fastcall is a suggestion to use registers to pass arguments, if possible, instead of using the stack. 1 << i is 1 shifted i times leftwards. It is equal to 2 to the power of i. (maskIO & 0x08) is masking bit 3 (2 to the power of 3 is 8). If bit 3 is set, the result is non-zero (true). I do not know what a "bit conjunction operator" is (unless it is just &). |
| All times are GMT +5.5. The time now is 17:09. |