Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Infinite Loops and Explicit Exits
In article <217e491a.0411151053.78a6954d@posting.google.com>, riplin@Azonic.co.nz (Richard)
 writes:
> Robert Wagner <spamblocker-robert@wagner.net> wrote
> 
>
> Who by, Robert ?  C is a low-level, value-orientated language that can
> be used _instead_ of assembler as a portable language for systems
> programming.
>
> What basis do you have for your belief that your nonsense is 'widely
> believed'. Actually it just suits you to make this up.

Actually, we recently had a blow-up in alt.folklore.computers over this
very topic.[1]  There were some advocates of the "C is portable assembly"
thesis - experienced programmers with significant C knowledge (though
not, I'm afraid, up to comp.lang.c's standard of language-lawyering).
 
>
> Yes it is. C's built in types are no more nor less than the machine's
> types, there is a direct correspondence on each machine.

Not true.  There are conforming C implementations with CHAR_BIT==8 on
machines that do not have direct octet operations, for example.  (The
ones I've seen documented on comp.lang.c are byte-addressable, in that
addresses refer to bytes, but operations on individual bytes are
implemented as word load / mask / store sequences.)

On the AS/400, C compiles to MI, which does not directly correspond to
the hardware.

> One can also
> request that a particular variable be 'register' or 'volatile'.

Note that conforming implementations do not need to do anything
meaningful with either the "register" storage-class specifier (other
than enforcing certain constraints, such as disallowing taking the
address of a variable with that sc-specifier) or the "volatile" type-
qualifier (again, other than some syntactic constraints).

An implementation is free to treat "register" as having no semantic
effect whatsoever.

On initial inspection "volatile" appears somewhat stronger, because
of the "access" rules (see ISO 9899-1990 6.5.3 and its equivalents
in later standards), but there's an escape clause: "What constitutes
an access to an object that has volatile-qualified type is implemen-
tation-defined".  In other words, "correct" volatile semantics are
purely a quality-of-implementation issue, and a conforming implemen-
tation can utterly disregard the volatile qualification.

Certainly, C was originally developed to be a low-level language,
and it remains low-level by various metrics.  But the C language
per se is not required to be "close to the metal".

The referenced alt.folklore.computers thread goes into this question
ad nauseum.


1. See the subthread beginning with message
http://groups.google.com/groups?sel...s3.newsguy.com.

--
Michael Wojcik                  michael.wojcik@microfocus.com

Auden often writes like Disney.  Like Disney, he knows the shape of beasts -
-
(& incidently he, too, might have a company of artists producing his lines) 
--
unlike Lawrence, he does not know what shapes or motivates these beasts.
-- Dylan Thomas

Report this thread to moderator Post Follow-up to this message
Old Post
Michael Wojcik
11-17-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:00 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.