This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Default type when only 'unsigned' is stated

Hey

I looking through some code, where the type of a parameter in a function call is stated as unsigned.

The data type (char, int, long) is not stated.
Does any one know which type is assumed when not stated.

Parents
  • Any, I understand that. It's not a 'bad' way to go, especially since code-monkeys have... uhm, lethologically challened at the moment... uhm, "issues."

    I'm just not fond of conditional compilation. I think that this particular conditional compilation would be worth the effort if incorporated properly.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Reply
  • Any, I understand that. It's not a 'bad' way to go, especially since code-monkeys have... uhm, lethologically challened at the moment... uhm, "issues."

    I'm just not fond of conditional compilation. I think that this particular conditional compilation would be worth the effort if incorporated properly.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Children
  • I would limit the conditional to e.g.
    #ifndef KeilC51
    wrong definitions, make your own
    #endif

    that keeps the clutter down.

    and the "make your own" should scare a code monkey to quit

    BTW Vince, I, personally, prefer U8 to u8 ....

    Erik

  • BTW Vince, I, personally, prefer U8 to u8 ....

    Hmmmm, I use ALL_CAPITAL_LETTERS for #defines.

    Granted a typedef is a form of #define, but I, personally, prefer u8 as opposed to U8.

    (After checking, my editor [CodeWright v7.5] recognizes U8 as a typedef, whereas my code does not identify U8 as being typedef'd. Thanks for helping me catch that).

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA