Welcome Guest.


There is an error in the nesting of the for statement in keil

Asked by: Sharon Ward 226 views IT December 26, 2018

A few for statements are nested with errors, asking for a big solution

1 Answers

  1. +3Votes  

    In the for loop, variables cannot be defined. Usually, if it is a global variable, the definition is declared at the top of the main program. If it is a local variable, in the main program void main () { / / here to start defining variables. / / Then the following while (1) { / / Under this, do not define variables. If you want to define variables in the child function, you can start to declare under the subroutine of the subroutine, such as void delay () { / / in This begins by declaring the definition variable unsigned int x;for(x=400;x>0;x–);

    Harold Williams- December 26, 2018 |