"static void" return in C

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msukumarbabu
    New Member
    • Nov 2007
    • 2

    #1

    "static void" return in C

    Hi all,

    When I am going through some C code, I found
    1) One function is returning "static void". I am not getting why void will be static.
    2) enum definition dues not contain any tags. only it had variable in that. with out any tags, how it will be used in remaining part.
    like
    enum { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR };

    Kindly requesting for some reference.
  • Meetee
    Recognized Expert Contributor
    • Dec 2006
    • 928

    #2
    Originally posted by msukumarbabu
    Hi all,

    When I am going through some C code, I found
    1) One function is returning "static void". I am not getting why void will be static.
    This may be because that whole function is static and limited to that scope. To learn more for static, google.
    Originally posted by msukumarbabu
    2) enum definition dues not contain any tags. only it had variable in that. with out any tags, how it will be used in remaining part.
    like
    enum { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR };

    Kindly requesting for some reference.
    There will be some micro defining this all labes. Check for that.

    Regards

    Comment

    Working...