By that criterion, printf is definitely part of the C language.

printf is not part of the C syntax or semantics, it is a function
defined in a library.

Fortran and Pascal are examples of languages where the I/O is
defined to be part of the syntax/semantics of the languages and
not as functions defined in a library (although are likely to
get mapped to calls to some sequence of internal library calls).

The language/library distinction is important for the compiler,
which in one case has to recognise certain character sequences and
perform special processing of them and in the other just handles
a construct the same as any other function call.

As a compiler writer I don't regard printf as being part of the language
but as part of the library.  The average user is unlikely to make
this distinction and view the language as being whatever they can be
guaranteed to get out of the box when they obtain a conforming

The definition of 'language' depends on who you are talking to.

Derek M. Jones                         tel: +44 (0) 1252 520 667
Knowledge Software Ltd                 mailto:de...@knosof.co.uk
Source code analysis                   http://www.knosof.co.uk

The Open University is incorporated by Royal Charter (RC 000391), an exempt charity 
in England & Wales and a charity registered in Scotland (SC 038302).

Reply via email to