| ??? 11/13/02 18:52 Read: times |
#32421 - RE: Parsing Arrays in uC51 |
I'm not sure why you have used [3] unless you group by threes, but your nextString function doesn't use this information. I will ignore these and just assume an array of strings. Also, you need to insert a null at the end of the list to know when to stop.
Below is an approach to doing this... <>< Lance. code uchar *textArray[] = {"bla","blub","Bla", "qwe","qwer","qwe", null}; uchar **nextString; 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); |
| Topic | Author | Date |
| 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 |



