Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.lang.c Subject: Re: CDECL source code Message-ID: <975@mwtech.UUCP> Date: 26 Nov 90 11:28:51 GMT References: <5656@abaa.UUCP> <12671@ganymede.inmos.co.uk> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 39 In article <12671@ganymede.inmos.co.uk> conor@inmos.co.uk (Conor O'Neill) writes: >In article <5656@abaa.UUCP> korsberg@abaa.UUCP (Ed Korsberg) writes: >>I am looking for the source code to a program [ to ] >>translate an English description of a C variable into the C-style >>variable. For example [...] >> int (*(*x)[10])(); >Doesn't anybody else see the irony of needing a program to write >C declaration syntax? > >And some people teach this language to beginners.... I don't quite understand this. What really *is* a problem teaching C to beginners is that it may be difficult to explain the concept of pointers to functions (oh well, ever teached those `senior programmers' who were doing their `professional work' with BASIC for ten years or more an to whom you can't explain *anything* if you can't show how this can be done in BASIC). But if you mean the syntax: I've never ever had difficulties to explain the C syntax to beginners, provided they had understood the concepts of pointers, arrays, and functions. Probably there are many teachers out there, who still have difficulties understanding the syntax. It is more or less human that many of those teachers try to hide their own problems by using a program as "cdecl" to prepare their questions and check the answers of their students. I've too sometimes given "cdecl" to my students, but not before I was sure that they used it only to re-check the answers they figured out *without* using it. BTW: It would be nice to have a "cdecl" program with a buildtin "quiz-mode". Such a program should randomly generate questions (either in C syntax or in verbose description of the desired type) and then accept answers (for the beginner in multiple choice style). I'm sure, a student playing half an hour with such a program will never ever need to use "cdecl" for real programming tasks. -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83