1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

a few questions about C++ source code

Discussion in 'C++' started by mac1234mac, Sep 26, 2008.

  1. mac1234mac

    mac1234mac New Member

    Sep 25, 2008
    Likes Received:
    Trophy Points:

    I have before my eyes source code, but I Can't understand certain parts of

    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 :
    I particularly mean expression in parenthesis: (maskIO & 0x08) what
    does it mean?.
    Shouldn't there be applied bit conjunction operator?.

    Thank You for answer.
  2. oogabooga

    oogabooga New Member

    Jan 9, 2008
    Likes Received:
    Trophy Points:
    #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 &).

Share This Page