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

is there inline funtion in keil c51

i want to use inline function like in
c++ language.
how to do in keil c or it's not support?
use #define to simulate ?

Parents
  • It's not supported.

    However, some of the optimisation options in v6.14 might help?

    If you do use #defines, be very careful about all the pitfalls - especially parenteses, side-effects, etc
    Check the discussion in K&R!
    It would probably pay you to inspect the preprocessor listing carefully to ensure that you're actually getting what you intended.

Reply
  • It's not supported.

    However, some of the optimisation options in v6.14 might help?

    If you do use #defines, be very careful about all the pitfalls - especially parenteses, side-effects, etc
    Check the discussion in K&R!
    It would probably pay you to inspect the preprocessor listing carefully to ensure that you're actually getting what you intended.

Children