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

Use of Period In Conditional?

This is a basic question, but I'm hoping someone can help decipher this line of code for me. I can't find a reference anywhere to what the period in this statement does. I assume by the setup that it is some sort of conditional, but would appreciate any further info. Is it Keil specific?

Counter[CounterInstance].Output = FALSE

Parents
  • Sir,

    You need to learn C to understand what this does (and further understand that this is NOT a conditional expression, but an assigment). I guess you're a pascal guy or something? That's what I recall conditionals looking like in pascal in a former life.

    Basically, the variable "Counter" is an array of "structures." In C, to access a member of a specific structure, you use a "." and then the name of the member. So... this statement says that the "Output" member of the "counterinstance-th" element in the array "Counter" is being assigned the value of FALSE;

    And I suspect that none of that will make any sense unless you buy a C book.

Reply
  • Sir,

    You need to learn C to understand what this does (and further understand that this is NOT a conditional expression, but an assigment). I guess you're a pascal guy or something? That's what I recall conditionals looking like in pascal in a former life.

    Basically, the variable "Counter" is an array of "structures." In C, to access a member of a specific structure, you use a "." and then the name of the member. So... this statement says that the "Output" member of the "counterinstance-th" element in the array "Counter" is being assigned the value of FALSE;

    And I suspect that none of that will make any sense unless you buy a C book.

Children