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

    Joined:
    Sep 25, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. oogabooga

    oogabooga New Member

    Joined:
    Jan 9, 2008
    Messages:
    115
    Likes Received:
    11
    Trophy Points:
    0
    #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