Actually, I think the 'pass' is a byte count grabbed from the early part of the buffer. When we saw the full loop there was an interesting "--pass" somewhere in it. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: rostaman To: Sent: Friday, January 26, 2001 11:13 AM Subject: Re: [OT]: quick question on C > Oluseyi: > > From the variable name, "rx_str", it appears that > the for loop is traversing an array of characters, > where the "ptr1 bounds, and the "pass" part is checking for a NULL > character, or the end of the string. So, the > "pass" by itself is the same as "if (pass != NULL), > continue", which will break out if a NULL terminator > is seen before the end of the array is reached. > > Have fun! > Ross > > > > > > ---- Oluseyi Odeinde wrote: > > 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 > 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 > > > > > > > > __________________________________________________ > FREE voicemail, email, and fax...all in one place. > Sign Up Now! http://www.onebox.com > > -- > 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