473,462 Members | 1,243 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Does C an ISO standard?

Dear all,

I found in the ISO web site that C is an ISO standard. I wonder if it
refers to the requirements for implementing the C programming language and
its library (like C++), or the langauge specification (like C#)? Thanks!

Regards,
Zoe
Nov 14 '05 #1
6 1196
zo************@yahoo.com scribbled the following:
Dear all, I found in the ISO web site that C is an ISO standard. I wonder if it
refers to the requirements for implementing the C programming language and
its library (like C++), or the langauge specification (like C#)? Thanks!


AFAIK the ISO C standard is a language specification. But so is the ISO
C++ standard. Could you explain what you mean by "the requirements for
implementing the programming language and its library"?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Life without ostriches is like coffee with milk."
- Mika P. Nieminen
Nov 14 '05 #2
>> I found in the ISO web site that C is an ISO standard. I wonder if it
refers to the requirements for implementing the C programming language
and
its library (like C++), or the langauge specification (like C#)? Thanks!


AFAIK the ISO C standard is a language specification. But so is the ISO
C++ standard. Could you explain what you mean by "the requirements for
implementing the programming language and its library"?


"The requirements for implementing the programming language and its
library" - I think it should be the syntax and the semantics for C (or
others?). Will these lead to the same program behavior with different
implementations? Thanks!

Regards,
Zoe
Nov 14 '05 #3
zo************@yahoo.com scribbled the following:
I found in the ISO web site that C is an ISO standard. I wonder if it
refers to the requirements for implementing the C programming language
and
its library (like C++), or the langauge specification (like C#)? Thanks!
AFAIK the ISO C standard is a language specification. But so is the ISO
C++ standard. Could you explain what you mean by "the requirements for
implementing the programming language and its library"?

"The requirements for implementing the programming language and its
library" - I think it should be the syntax and the semantics for C (or
others?). Will these lead to the same program behavior with different
implementations? Thanks!


Yes, C has an ISO standard specifying its syntax and semantics. But I
fail to see how this differs from a language specification.
Whether this leads to the same program behaviour with different
implementations depends on the conformance level of your program. If you
only use the features described in the standard, then yes. (Actually,
provisionally yes - you might run into implementation-defined stuff for
example in alignment issues.) But most OSes and compiler vendors have
their own APIs, either open or proprietary, but always non-standard. Use
of these will make your program non-portable.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"How come even in my fantasies everyone is a jerk?"
- Daria Morgendorfer
Nov 14 '05 #4
> Yes, C has an ISO standard specifying its syntax and semantics. But I
fail to see how this differs from a language specification.
Mm... I think a language specification should define a program's behavior
also, like the one in Java (though Java is not an ISO standard).
Whether this leads to the same program behaviour with different
implementations depends on the conformance level of your program. If you
only use the features described in the standard, then yes. (Actually,
provisionally yes - you might run into implementation-defined stuff for
example in alignment issues.) But most OSes and compiler vendors have
their own APIs, either open or proprietary, but always non-standard. Use
of these will make your program non-portable.


I see. Thanks very much! Btw, as you mentioned, C is platform dependent,
so if I only use the features described in the standard, only the C source
is portable, but not the executable.

Regards,
Zoe
Nov 14 '05 #5
zo************@yahoo.com wrote:
I see. Thanks very much! Btw, as you mentioned, C is platform dependent,
so if I only use the features described in the standard, only the C source
is portable, but not the executable.


And since when is "the executable" portable for any language? If you
want to claim that some interpreted language or language compiled to
some intermediate form qualifies, then remember that the interpreter or
"engine" is part of the executable.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #6
zo************@yahoo.com scribbled the following:
Yes, C has an ISO standard specifying its syntax and semantics. But I
fail to see how this differs from a language specification.
Mm... I think a language specification should define a program's behavior
also, like the one in Java (though Java is not an ISO standard).
Java is based on an official definition, but it's published by Sun, not
by ISO. So Java is not as "standardised" as C.
Whether this leads to the same program behaviour with different
implementations depends on the conformance level of your program. If you
only use the features described in the standard, then yes. (Actually,
provisionally yes - you might run into implementation-defined stuff for
example in alignment issues.) But most OSes and compiler vendors have
their own APIs, either open or proprietary, but always non-standard. Use
of these will make your program non-portable.

I see. Thanks very much! Btw, as you mentioned, C is platform dependent,
so if I only use the features described in the standard, only the C source
is portable, but not the executable.


Yes, that's right. The compiled executable form of C code is generally
not portable across implementations.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Last year he disrespected me - and then he showed lack of respect."
- Anthony Mason
Nov 14 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Andrea | last post by:
Hi everyone, I am in the process of learning javascript and have a question on location.href. Does javascript always require the <script language = "javascript"> (or script...
11
by: Grant Edwards | last post by:
I've read over and over that Python leaves floating point issues up to the underlying platform. This seems to be largely true, but not always. My underlying platform (IA32 Linux) correctly...
44
by: Bamber | last post by:
Why does f get returned ? (compiled with gcc). #include<stdio.h> int func(int a); main() { int f; f=func(7); printf("f=%d",f);
24
by: Sunner Sun | last post by:
Hi! I have looked through the FAQ but found nothing about it. :-) It seems that this kind of macro is platform dependent, doesn't it? Thank you. Sunner Sun
24
by: David Mathog | last post by:
If this: int i,sum; int *array; for(sum=0, i=0; i<len; i++){ sum += array; } is converted to this (never mind why for the moment):
20
by: TTroy | last post by:
Hello, I have found some peculiar behaviour in the fgets runtime library function for my compiler/OS/platform (Dev C++/XP/P4) - making a C console program (which runs in a CMD.exe shell). The...
5
by: Stephen Mayes | last post by:
#include <stdio.h> #include <stdlib.h> #include <string.h> int main (void) { static char * contents = "Line1\nLine2\nLine3\nLine4"; FILE * tmp; char readbuf; size_t len, n = 0;
29
by: Vol | last post by:
I think 'atan' can get the angle but it is not the four quadrant angle. Is there any function that i can get the angle from -pi to pi? or I have to use some if ... else? I know in Matlab, we use...
6
by: zl2k | last post by:
hi, there I am using a big, sparse binary array (size of 256^3). The size may be changed in run time. I first thought about using the bitset but found its size is unchangeable. If I use the...
89
by: Cuthbert | last post by:
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.