why can't we use "goto loop" in psoc3?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 It's said that PSOC Creator is supported by KEIL,but now,we can't use "goto loop".How can we find another code with the same founction to replace it? 

   

3Q ~

0 Likes
1 Solution
Anonymous
Not applicable

Hi Fenn,

   

 

   

When using PSoC 3, Keil Compiler is used in PSoC Creator. Hence, the keywords defined for Keil is applicable to PSoC Creator also.

   

 

   

"goto" is used to branch to another location in a program. It transfers the control to the labeled statement whose label matches the Identifier.

   

 

   

Consider a simple example as shown below:

   

 

   

if (a <= 11)

   

{

   

     b = 100;

   

     goto ESCAPE;

   

}

   

b = 50;

   

ESCAPE:

   

.........................

   

.....................

   

.......................

   

 

   

In this code, ESCAPE is the Identifier. When tested in Debug mode on PSoC 3, the "goto" statement executed as expected at my end.

View solution in original post

0 Likes
5 Replies