Re: Applications of ANSI C

Discussion in 'C Programming' started by Richard Heathfield, Jul 16, 2003.

  1. signuts wrote:

    > Just wondering what applications people have developed using ANSI
    > compliant C.
    >
    > Interested of what usable & portable applications are out there. If the
    > structure of a file system isn't even defined then how are you supposed
    > to even save user preferences? Is ANSI C so outdated that all it's good
    > for is data-entry and performing calculations? I know this if OT, but this
    > is as good as place as any to ask these questions.


    You've missed the point of standards conformance.

    Many people can, and do, use ISO C to write "little" programs that do one
    job well. By sticking to the Standard when writing the code, they know the
    program will work on whatever platform they happen to be using at the time.
    Example: today I wrote an elementary track generator in ISO C; its output
    (which was to stdout) was in just the right format to be read in by my
    graphics engine (which is also written in ISO C).

    The actual graphics rendering uses Win32 API calls, but eventually I'll get
    so sick of Windows that I'll want to port it to Linux. Since the graphics
    engine and track generator, and all the game logic, are written in standard
    C, porting it will be much simpler than if I had littered the code with
    Windows-specific calls.

    A year or three ago, I was working on a rather nice Web browser for set-top
    boxes. Half a million lines of code, of which 99% (no, that's not a made-up
    figure) was ISO C. So whenever the browser was ported to a new box, only 1%
    of the code had to be rewritten. About 5000 lines. Hardly a trivial task,
    but a darn sight easier (and therefore cheaper) than it would otherwise
    have been.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
    Richard Heathfield, Jul 16, 2003
    #1
    1. Advertising

  2. Richard Heathfield

    gswork Guest

    Richard Heathfield <> wrote in message news:<bf4bma$89l$>...
    > signuts wrote:
    >
    > > Just wondering what applications people have developed using ANSI
    > > compliant C.
    > >
    > > Interested of what usable & portable applications are out there. If the
    > > structure of a file system isn't even defined then how are you supposed
    > > to even save user preferences? Is ANSI C so outdated that all it's good
    > > for is data-entry and performing calculations? I know this if OT, but this
    > > is as good as place as any to ask these questions.

    >
    > You've missed the point of standards conformance.
    >
    > Many people can, and do, use ISO C to write "little" programs that do one
    > job well. By sticking to the Standard when writing the code, they know the
    > program will work on whatever platform they happen to be using at the time.
    > Example: today I wrote an elementary track generator in ISO C; its output
    > (which was to stdout) was in just the right format to be read in by my
    > graphics engine (which is also written in ISO C).
    >
    > The actual graphics rendering uses Win32 API calls, but eventually I'll get
    > so sick of Windows that I'll want to port it to Linux. Since the graphics
    > engine and track generator, and all the game logic, are written in standard
    > C, porting it will be much simpler than if I had littered the code with
    > Windows-specific calls.
    >
    > A year or three ago, I was working on a rather nice Web browser for set-top
    > boxes. Half a million lines of code, of which 99% (no, that's not a made-up
    > figure) was ISO C. So whenever the browser was ported to a new box, only 1%
    > of the code had to be rewritten. About 5000 lines. Hardly a trivial task,
    > but a darn sight easier (and therefore cheaper) than it would otherwise
    > have been.


    I find this the most compelling reason for standardised languages -
    not that they should in themselves be solely used for applications,
    even though they may well lend themselves to certain apps, but that
    they can form the core of an application onto which platform specific
    functionality can be added, as in the browser example given.
    gswork, Jul 17, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joona I Palaste

    Re: Applications of ANSI C

    Joona I Palaste, Jul 16, 2003, in forum: C Programming
    Replies:
    7
    Views:
    348
  2. Malcolm

    Re: Applications of ANSI C

    Malcolm, Jul 16, 2003, in forum: C Programming
    Replies:
    1
    Views:
    343
    Thomas Matthews
    Jul 16, 2003
  3. Replies:
    1
    Views:
    475
  4. Replies:
    11
    Views:
    1,055
    Keith Thompson
    Apr 28, 2008
  5. Frank Iannarilli

    pre-ansi to ansi c++ conversion?

    Frank Iannarilli, Jul 21, 2009, in forum: C++
    Replies:
    2
    Views:
    404
Loading...

Share This Page