Frank,
> hands up those who call themselves C programmers who don't understand
> this C program:
>
> main()
> {
> printf("Hello world.\n");
> }
>
> (Those with their hands in the air: you're fired.)
I am not so sure you should be firing readers, you perhaps ought to be firing the
writer: the above is really awful code. The procedure has no explicit return type
so int is assumed and yet there is no return statement to give the return value a
value so what value is returned. What does printf actually do? Without an
operating system (or not) context the behaviour of printf cannot be divined.
The issue here is that understanding requires an operational semantics as well as
an ability to read the code.
Russel.
======================================================================
Professor Russel Winder Professor of Computing Science
Department of Computer Science Fax: +44 20 7848 2851/+44 20 7848 2913
King's College London [EMAIL PROTECTED]
Strand, London WC2R 2LS, UK http://www.dcs.kcl.ac.uk/staff/russel/
- Automatic footer for [EMAIL PROTECTED] ----------------------------------
To unsubscribe from this list, mail [EMAIL PROTECTED] unsubscribe discuss
To join the announcements list, mail [EMAIL PROTECTED] subscribe announce
To receive a help file, mail [EMAIL PROTECTED] help
This list is archived at http://www.mail-archive.com/discuss%40ppig.org/
If you have any problems or questions, please mail [EMAIL PROTECTED]