home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / CTELL / READ.ME < prev   
Text File  |  1993-12-01  |  2KB  |  41 lines

  1.                CTELL.EXE - Create and Explain C Declarations
  2.  
  3.  
  4. As even the developers of C admit,  the C declarations are  somewhat  of  a 
  5. mess.  Even C programmers of long experience have trouble figuring out just 
  6. how  to write the declaration for,  say,  a 10 element array of pointers to 
  7. functions returning pointers to char.  CTELL is a beginning  on  help  with 
  8. such problems.  
  9.  
  10. CTELL  was  derived,   with  MUCH  effort,  from  a  program  described  in 
  11. Micro/System Journal.  It will accept an input declaration in English, such 
  12. as "declare foo as array 10 of pointer to  function  returning  pointer  to 
  13. char" , and returns the corresponding C declaration,  "char *(*foo[10])()".  
  14. It will also accept the declaration, 
  15.      "explain float (*(*(****(*(*foo())())[5])())())()"
  16. and  return  the  English description, 
  17.      "declare foo as  function  returning  pointer  to  function  returning 
  18.       pointer  to  array  5  of pointer to pointer to pointer to pointer to 
  19.       function returning pointer to function returning pointer to  function 
  20.       returning float" 
  21. (I  would like to see someone come up with a program that legitimately uses 
  22. this declaration.) 
  23.  
  24.  
  25. USAGE:
  26.  
  27.         C:>CTELL
  28.  
  29. CTELL is interactive  and,  after  displaying  a  somewhat  cryptic  "help" 
  30. screen,  will  await user input with no prompt.  Each CTELL command must be 
  31. fully contained on a single input line,  thus,  for keyboard input,  you  a 
  32. limited by the size of the keyboard buffer (the "monster" declaration above 
  33. cannot be input through the keyboard,  it must be input through redirection 
  34. from a file.)   CTELL is terminated by a Control-Z followed by a CR.
  35.  
  36. The file, CDIN.TXT, contained in this archive,  is an example of redirected 
  37. input (it contains the "monster" declare command) and is used as follows: 
  38.  
  39.         C:>CTELL <CDIN.TXT
  40.  
  41.