Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: Applications of ANSI C

Reply
Thread Tools

Re: Applications of ANSI C

 
 
Richard Heathfield
Guest
Posts: n/a
 
      07-16-2003
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 : http://www.velocityreviews.com/forums/(E-Mail Removed)
"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
 
Reply With Quote
 
 
 
 
gswork
Guest
Posts: n/a
 
      07-17-2003
Richard Heathfield <(E-Mail Removed)> wrote in message news:<bf4bma$89l$(E-Mail Removed)>...
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pre-ansi to ansi c++ conversion? Frank Iannarilli C++ 2 07-21-2009 11:05 PM
Are there statistics packages in ANSI C and/or ANSI C++? lbrtchx@gmail.com C Programming 11 04-28-2008 03:00 AM
Are there statistics packages in ANSI C and/or ANSI C++? lbrtchx@gmail.com C++ 1 04-24-2008 06:44 PM
Re: Applications of ANSI C Joona I Palaste C Programming 7 07-26-2003 01:27 AM
Re: Applications of ANSI C Malcolm C Programming 1 07-16-2003 08:02 PM



Advertisments