CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

When I use B0

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
NewSpace



Joined: 23 Sep 2003
Posts: 12
Location: South KOREA

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

When I use B0
PostPosted: Mon Feb 21, 2005 8:32 am     Reply with quote

Dear Master~!

Code:

void reset()
{
   printf("%c%c%c",0xa1,0,2);
   printf("%c Stop               %c",0xa2, 0);

   state == 0;
   C5 = ON;
   output_c(0x00);
   output_d(0x00);
}
#INT_EXT
ext_isr()
{
   reset();
}

void main()
{
   setup_adc_ports(NO_ANALOGS);
   ext_int_edge(0,L_TO_H);
   enable_interrupts(int_ext);
   enable_interrupts(global);

   while(1)
   {                                                       <==== Here~!
      if(state == 0)
      {
         if(input(pin_b1))
         INIT();
         state = 1;
     }
      else if(state == 1)
      {
         if(input(pin_b1))
         Start();
     }   
}



When I push B0 than state = 0 I checked ..
But than I wanna go Here~~~ mark...
_________________
Hello~?

This is South KOREA
My name is Sanghyouk Kim But Call me Nick
Sorry I'm poor English
NewSpace



Joined: 23 Sep 2003
Posts: 12
Location: South KOREA

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

It's mean...
PostPosted: Mon Feb 21, 2005 9:00 am     Reply with quote

Code:

#INT_EXT
ext_isr()
{
   reset();
   goto start_a;
}

   while(1)
   {                                                       <==== Here~!
      start_a:
      if(state == 0)
      {
         if(input(pin_b1))
         INIT();

_________________
Hello~?

This is South KOREA
My name is Sanghyouk Kim But Call me Nick
Sorry I'm poor English
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 21, 2005 1:06 pm     Reply with quote

This is not really a CCS compiler question. It's a C language question.

But the answer is, if you want to jump back to the start of a
while() loop, then use the "continue" statement.


Here is the MSDN reference article on the "continue" statement:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng/htm/state_4.asp
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group