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

static key word in user functions

Can I use static key word in user function?

FUNC char StateMachine(void)
{
  static unsigned char _state;

  switch(_state)
  {
    case 0:
      ...
  }
}

Parents
  • Agreed - it certainly doesn't look like an exhaustive list.

    There is, apparently, no full formal published language specification/definition.

    So I would also conclude that 'static' is just not supported.

    If you want a definitive answer, you are going to have to contact Keil direct.

    Again, the forum is not the place to contact Keil support

Reply
  • Agreed - it certainly doesn't look like an exhaustive list.

    There is, apparently, no full formal published language specification/definition.

    So I would also conclude that 'static' is just not supported.

    If you want a definitive answer, you are going to have to contact Keil direct.

    Again, the forum is not the place to contact Keil support

Children
No data