Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/13/02 18:56
Read: times


 
#32422 - RE: Parsing Arrays in uC51
Oops, I meant to use...

uchar **nextStr;

the whole code snippet is...

<code>
code uchar *textArray[] = {"bla","blub","Bla",
"qwe","qwer","qwe", null};
uchar **nextStr;

void setFirstString( uchar **firstStr ) {
nextStr = firstStr;
}

uchar *nextString() {
return (nextStr!=null) ? *(nextStr++) : null;
}

Use it like...
uchar *str;
setFirstString( &textArray[0] );
while( (str=nextString()) != null )
do_something(str);

</code>

List of 3 messages in thread
TopicAuthorDate
Parsing Arrays in uC51            01/01/70 00:00      
RE: Parsing Arrays in uC51            01/01/70 00:00      
RE: Parsing Arrays in uC51            01/01/70 00:00      

Back to Subject List