Using string libs for Car and Cdr

Peter C. Bahrs pcb at gator.cacs.usl.edu
Thu May 3 07:34:55 AEST 1990


Given a balanced parenthesized list :   ( ( a b ) (d (e ) e) )
in a char *buffer...

Besides looping through each buffer[i], has anyone suggestions or
examples using string functions on how to implement :
   char *c = car(buffer),  *d = (cdr (buffer)), *e = second(buffer)
:  c == ( a b ),  d == ( (d (e ) e) )), e == (d (e ) e) 

?
/*----------- Thanks in advance... --------------------------------------+
| Peter C. Bahrs                                                         |
| The USL-NASA Project                                                   |
| Center For Advanced Computer Studies      INET: pcb at gator.cacs.usl.edu |
| 2 Rex Street                                                           |
| University of Southwestern Louisiana      ...!uunet!dalsqnt!gator!pcb  | 
| Lafayette, LA 70504                                                    |
+-----------------------------------------------------------------------*/



More information about the Comp.lang.c mailing list