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

Re: About structure definition

To avoid flames, if I try to reply a cannot find a 'post' nor 'preview' button,
so I must start a new message thread.
Sorry for the inconvinience.

Dear KEIL Support Team, can you solve the
problem with posting ?

----------------------------------------
It simply sets the all MInfo.'values' to a defined status, that is right.
It was probably used with the intention to
preset more than one variable of type
MfCmdInfo.

Example:

MfCmdInfo MInfo, MSecondInfo, MAnotherInfo;

ResetInfo(MInfo);
ResetInfo(MSecondInfo);
ResetInfo(MAnotherInfo);

will result in:

MInfo.cmd=0
MInfo.status=MI_OK;
.....

MSecondInfo.cmd=0;
MSecondInfo.status=MI_OK;
.....

MAnotherInfo.cmd=0;
MAnotherInfo.status=MI_OK;
.....

For the rest I'm confirm with Drew, it is a simply substitution macro and if we misunderstand you, let us know , what
exactly you want to try.

Stefan

Parents
  • "To avoid flames, if I try to reply a cannot find a 'post' nor 'preview' button,
    so I must start a new message thread."


    The buttons are there - you just have to scroll way over to the right to find them!

    "Dear KEIL Support Team, can you solve the
    problem with posting ?"


    The problem lies in the original post - because it was so damned wide!
    The buttons just position themselves at the midpoint of the width!

    "It was probably used with the intention to preset more than one variable of type"

    Which begs the question: why use a macro rather than a true function, or memset?

Reply
  • "To avoid flames, if I try to reply a cannot find a 'post' nor 'preview' button,
    so I must start a new message thread."


    The buttons are there - you just have to scroll way over to the right to find them!

    "Dear KEIL Support Team, can you solve the
    problem with posting ?"


    The problem lies in the original post - because it was so damned wide!
    The buttons just position themselves at the midpoint of the width!

    "It was probably used with the intention to preset more than one variable of type"

    Which begs the question: why use a macro rather than a true function, or memset?

Children