home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boston 2
/
boston-2.iso
/
DOS
/
PROGRAM
/
C
/
CTELL
/
READ.ME
< prev
Wrap
Text File
|
1993-12-01
|
2KB
|
41 lines
CTELL.EXE - Create and Explain C Declarations
As even the developers of C admit, the C declarations are somewhat of a
mess. Even C programmers of long experience have trouble figuring out just
how to write the declaration for, say, a 10 element array of pointers to
functions returning pointers to char. CTELL is a beginning on help with
such problems.
CTELL was derived, with MUCH effort, from a program described in
Micro/System Journal. It will accept an input declaration in English, such
as "declare foo as array 10 of pointer to function returning pointer to
char" , and returns the corresponding C declaration, "char *(*foo[10])()".
It will also accept the declaration,
"explain float (*(*(****(*(*foo())())[5])())())()"
and return the English description,
"declare foo as function returning pointer to function returning
pointer to array 5 of pointer to pointer to pointer to pointer to
function returning pointer to function returning pointer to function
returning float"
(I would like to see someone come up with a program that legitimately uses
this declaration.)
USAGE:
C:>CTELL
CTELL is interactive and, after displaying a somewhat cryptic "help"
screen, will await user input with no prompt. Each CTELL command must be
fully contained on a single input line, thus, for keyboard input, you a
limited by the size of the keyboard buffer (the "monster" declaration above
cannot be input through the keyboard, it must be input through redirection
from a file.) CTELL is terminated by a Control-Z followed by a CR.
The file, CDIN.TXT, contained in this archive, is an example of redirected
input (it contains the "monster" declare command) and is used as follows:
C:>CTELL <CDIN.TXT