by the way, b4 going into the for loop 'size' is 28, and and 'ptr1' is 18. so y do u say ptr1 will never be > 1?. this is what the for loop looks like and as u can see 'pass' is being decremented for (pass=rx_str[ptr1+1]; ptr1 i dont know how it makes sense to u ,.. but from wht i see ur ptr1 is never > gona be more than 1 > alok > > > -----Original Message----- > > From: Oluseyi Odeinde [SMTP:seyi@OCEAN.CF.AC.UK] > > Sent: Friday, January 26, 2001 6:10 PM > > To: PICLIST@MITVMA.MIT.EDU > > Subject: Re: [OT]: quick question on C > > > > cheers. makes sense! > > > > for (pass=rx_str[ptr1+1]; ptr10; ptr1++) { > > > > > > D Lloyd wrote: > > > > > Hi, > > > > > > Its the same as > > > > > > "for( set initial condition ; termination condition ; iteration > > condition > > > )", if you like....where the termination condition is met if 'ptr1' is > > less > > > than 'size' AND pass is a non zero value. > > > > > > Dan > > > > > > (Embedded Oluseyi Odeinde @MITVMA.MIT.EDU> > > > image moved 26/01/2001 12:00 > > > to file: > > > pic13186.pcx) > > > > > > Please respond to pic microcontroller discussion list > > > > > > Sent by: pic microcontroller discussion list > > > > > > To: PICLIST@MITVMA.MIT.EDU > > > cc: > > > Subject: Re: [OT]: quick question on C > > > > > > Security Level:? Internal > > > > > > u lost me there! > > > > > > Alok Dubey wrote: > > > > > > > whoops > > > > make that a boolean AND of size and pass > > > > sorry > > > > alok > > > > > > > > > -----Original Message----- > > > > > From: Alok Dubey (OCS-BLRAKS-AVS) > > > > > Sent: Friday, January 26, 2001 5:25 PM > > > > > To: 'pic microcontroller discussion list' > > > > > Subject: RE: [OT]: quick question on C > > > > > > > > > > i hnk it is a boolean of size and pass which is then compared to > > ptr1 > > > > > alok > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Oluseyi Odeinde [SMTP:seyi@OCEAN.CF.AC.UK] > > > > > Sent: Friday, January 26, 2001 5:15 PM > > > > > To: PICLIST@MITVMA.MIT.EDU > > > > > Subject: [OT]: quick question on C > > > > > > > > > > i apologise if this post appears more than once - just > > realised > > > that > > > > > the > > > > > 1st time i sent it, my [OT] channel was turned off! > > > > > > > > > > hello everyone, > > > > > > > > > > i came across the following 'for' statement in a code: > > > > > > > > > > for (pass=rx_str[ptr1+1]; ptr1 > > > > > > > > > i'm curious about about the 'ptr1 > statement > > > as > > > > > i > > > > > have never come across a for loop layed out in this way. > > > > > 1. is this valid? > > > > > 2. if so, is it the same as saying 'ptr1 > > > > > > > > > TIA > > > > > Seyi > > > > > > > > > > -- > > > > > http://www.piclist.com hint: To leave the PICList > > > > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > > > > > > -- > > > > http://www.piclist.com hint: To leave the PICList > > > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu