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

Programmsize restriction within codeblock

Hello,
are there any restrictions of codesize within a codeblock?

For examle the first code doesn't work:

if ( value ){
        .
        .       many Codelines
        .
}


If i shorten the code above, then it works. i couldn't find out the border to the codesize within the block.

But this Code works correct:

if ( value ){
        myfunction();
}

void myfunction (void){
        .
        .       many Codelines
        .
}

In both cases i don't get any error-messages from the compiler, while compiling.

Thanks for help
Christian Tauschek

Parents
  • "The code doesn't work the way you expect it to? That's nothing new. Before blaming the compiler, you should search for bugs in your code. Timing-related bugs, interaction with interrupts (shared resources), even the simplest things like an unserviced watchdog timer can crash a program."

    I don't think the OP was saying that his code wasn't working. Rather that the compiler reported an error with these larger blocks.

Reply
  • "The code doesn't work the way you expect it to? That's nothing new. Before blaming the compiler, you should search for bugs in your code. Timing-related bugs, interaction with interrupts (shared resources), even the simplest things like an unserviced watchdog timer can crash a program."

    I don't think the OP was saying that his code wasn't working. Rather that the compiler reported an error with these larger blocks.

Children