In Harbison and Steele's text (fourth edition, p.111)
it is stated,
The C language does not specify the range of integers that the
integral types will represent, except ot say that type int may not
be smaller than short and long may not be smaller than int.
They go on to say,
Many implementations represent characters in 8 bits, type short in
16 bits, and type long in 32 bits, with type int using either 16 or
32 bits depending on the implementation. ISO C requires
implementations to use at least these widths.
If the C language is not defined by ISO C, then what defines it?
--
Randy Yates
Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA ra*********@son yericsson.com, 919-472-1124 86 3864
"Randy Yates" <ra*********@so nyericsson.com> wrote in message
news:xx******** *****@usrts005. corpusers.net.. . In Harbison and Steele's text (fourth edition, p.111) it is stated,
The C language does not specify the range of integers that the integral types will represent, except ot say that type int may not be smaller than short and long may not be smaller than int.
They go on to say,
Many implementations represent characters in 8 bits, type short in 16 bits, and type long in 32 bits, with type int using either 16 or 32 bits depending on the implementation. ISO C requires implementations to use at least these widths.
If the C language is not defined by ISO C, then what defines it?
There are requirements for conforming implementations , specified in ISO
standard documents, such as those you quote above. There is some leeway in
these requirements, as illustrated above, presumably to allow appropriate
choices to be made when creating an implementation for some specific
platform.
What is in the quotes that makes you think it is not defined by ISO C?
Alex
Alex Fraser wrote: "Randy Yates" <ra*********@so nyericsson.com> wrote in message news:xx******** *****@usrts005. corpusers.net.. .
In Harbison and Steele's text (fourth edition, p.111) it is stated,
The C language does not specify the range of integers that the integral types will represent, except ot say that type int may not be smaller than short and long may not be smaller than int.
They go on to say,
Many implementations represent characters in 8 bits, type short in 16 bits, and type long in 32 bits, with type int using either 16 or 32 bits depending on the implementation. ISO C requires implementations to use at least these widths.
If the C language is not defined by ISO C, then what defines it?
There are requirements for conforming implementations , specified in ISO standard documents, such as those you quote above. There is some leeway in these requirements, as illustrated above, presumably to allow appropriate choices to be made when creating an implementation for some specific platform.
What is in the quotes that makes you think it is not defined by ISO C?
Looks to me like he's asking if ISO doesn't define this'n'that(int eger
sizes etc.) Who does for a given arch/compiler ?
--
Nils O. Selåsdal www.utelsystems.com
"Nils O. Selåsdal" <NO*@Utel.no> writes: Alex Fraser wrote: "Randy Yates" <ra*********@so nyericsson.com> wrote in message news:xx******** *****@usrts005. corpusers.net.. .
In Harbison and Steele's text (fourth edition, p.111) it is stated,
The C language does not specify the range of integers that the integral types will represent, except ot say that type int may not be smaller than short and long may not be smaller than int.
They go on to say,
Many implementations represent characters in 8 bits, type short in 16 bits, and type long in 32 bits, with type int using either 16 or 32 bits depending on the implementation. ISO C requires implementations to use at least these widths.
If the C language is not defined by ISO C, then what defines it? There are requirements for conforming implementations , specified in ISO
standard documents, such as those you quote above. There is some leeway in these requirements, as illustrated above, presumably to allow appropriate choices to be made when creating an implementation for some specific platform. What is in the quotes that makes you think it is not defined by ISO C?
Looks to me like he's asking if ISO doesn't define this'n'that(int eger sizes etc.) Who does for a given arch/compiler ?
Prexactly. :)
I seem to recall conversations in years past of old machines that
had strange integer sizes (9 bits?) which C would support. Am I
delusional?
--
Randy Yates
Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA ra*********@son yericsson.com, 919-472-1124 "Randy Yates" "Nils O. Selåsdal" <NO*@Utel.no> Alex Fraser wrote: > "Randy Yates" >In Harbison and Steele's text (fourth edition, p.111)
[implementation of integer stuff] What is in the quotes that makes you think it is not defined by ISO C?
Looks to me like he's asking if ISO doesn't define this'n'that(int eger sizes etc.) Who does for a given arch/compiler ?
Prexactly. :)
I seem to recall conversations in years past of old machines that had strange integer sizes (9 bits?) which C would support. Am I delusional?
You are delusional if you think that the assiduous study of H&S won't reveal
a rich, flexible language that uses the ANSI/ISO standard as a bulwark. MPJ
Merrill & Michele wrote: "Randy Yates"
"Nils O. Selåsdal" <NO*@Utel.no>
Alex Fraser wrote:
>"Randy Yates" >In Harbison and Steele's text (fourth edition, p.111) [implementation of integer stuff] What is in the quotes that makes you think it is not defined by ISO C?
Looks to me like he's asking if ISO doesn't define this'n'that(int eger sizes etc.) Who does for a given arch/compiler ? Prexactly. :)
I seem to recall conversations in years past of old machines that had strange integer sizes (9 bits?) which C would support. Am I delusional?
The standard demands CHAR_BIT>=8 which gives you no problem with
9-bit-bytes. Furthermore, the effective range of signed int/unsigned int
according to the standard is that of a 16 bit number (but for INT_MIN),
so sizeof(int)*CHA R_BIT==18 (or 32, nowadays) gives you no problem,
either. The same for 36-bit-longs.
IMO, H&S have that right. Or did I misunderstand your question, too?
BTW: The good old machines with 6 bits to a byte probably do not
have any C implementations to speak of (... I wait to be contradicted).
You are delusional if you think that the assiduous study of H&S won't reveal a rich, flexible language that uses the ANSI/ISO standard as a bulwark. MPJ
Your point was... ? Do you want to encourage/contradict/... the OP?
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
In article <xx************ *@usrts005.corp users.net>,
Randy Yates <ra*********@so nyericsson.com> wrote: I seem to recall conversations in years past of old machines that had strange integer sizes (9 bits?) which C would support. Am I delusional?
Nine bits are not enough for the required ranges of integer types
such as short, int and long. It is, however, a perfectly valid
size for a byte, i.e. a char, unsigend char or signed char, in C.
A nine bit byte is only a strange size for people that view the
world through a PC.
--
Göran Larsson http://www.mitt-eget.com/ ho*@invalid.inv alid (Goran Larsson) writes: In article <xx************ *@usrts005.corp users.net>, Randy Yates <ra*********@so nyericsson.com> wrote:
I seem to recall conversations in years past of old machines that had strange integer sizes (9 bits?) which C would support. Am I delusional?
Nine bits are not enough for the required ranges of integer types such as short, int and long.
What ranges are those? Where are they specified? This statement contradicts
H&S: "The C language does not specify the range of integers that the
integral types will represent...".
--
Randy Yates
Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA ra*********@son yericsson.com, 919-472-1124
"Randy Yates" <ra*********@so nyericsson.com> wrote in message
news:xx******** *****@usrts005. corpusers.net.. . "Nils O. Selåsdal" <NO*@Utel.no> writes:
Prexactly. :)
I seem to recall conversations in years past of old machines that had strange integer sizes (9 bits?) which C would support. Am I delusional?
Back in the Bad Old Days (tm) of bitslicers any number of bits was posible.
I recall a conversation with an "old pro" who told me about 47-bits
computers.
-- Randy Yates Sony Ericsson Mobile Communications Research Triangle Park, NC, USA ra*********@son yericsson.com, 919-472-1124 "Michael Mair" Merrill & Michele wrote:"Randy Yates" "Nils O. Selåsdal" <NO*@Utel.no>
>Alex Fraser wrote: > >>"Randy Yates" >>In Harbison and Steele's text (fourth edition, p.111) [implementation of integer stuff]
>What is in the quotes that makes you think it is not defined by ISO >C?
Looks to me like he's asking if ISO doesn't define this'n'that(int eger sizes etc.) Who does for a given arch/compiler ?
Prexactly. :)
I seem to recall conversations in years past of old machines that had strange integer sizes (9 bits?) which C would support. Am I delusional? The standard demands CHAR_BIT>=8 which gives you no problem with 9-bit-bytes. Furthermore, the effective range of signed int/unsigned int according to the standard is that of a 16 bit number (but for INT_MIN), so sizeof(int)*CHA R_BIT==18 (or 32, nowadays) gives you no problem, either. The same for 36-bit-longs. IMO, H&S have that right. Or did I misunderstand your question, too?
BTW: The good old machines with 6 bits to a byte probably do not have any C implementations to speak of (... I wait to be contradicted).
You are delusional if you think that the assiduous study of H&S won't
reveal a rich, flexible language that uses the ANSI/ISO standard as a bulwark.
MPJ Your point was... ? Do you want to encourage/contradict/... the OP?
The sentence stands by itself. The OP had internal contradiction. Motives
are OT. MPJ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ross |
last post by:
I want to do some tricky text file manipulation on many files, but have
only a little programming knowledge.
What are the ideal languages for the following examples?
1. Starting from a certain folder, look in the subfolders for all
filenames matching *FOOD*.txt Any files matching in each folder should
be copied to a new subfolder within...
|
by: Hermawih |
last post by:
Hello ,
I want your opinion about this .
In order to say it clearly , I think I have to describe it in long sentences .
I could consider myself as Intermediate/Advance Access Developer ;
Intermediate/Advanced Database designer .
Because of the requirements , I must create Web Application . Access Pages
is not suitable for that so I...
|
by: thatisvaliant |
last post by:
is it possible to determine what language an exe was created in? for
example, i am interested in know what language onenote.exe and infopath.exe
are written in.
|
by: Sam Sungshik Kong |
last post by:
Hi!
This might be a stupid question.
With what language was C# compiler created?
I guess assembly.
Or C?
I am just curious.
Sam
|
by: Van Nastring |
last post by:
I believe it is c++ right? Why don't they use c#?
| |
by: gerryR |
last post by:
Not sure where to post this as I don't know what language it applies to
(yet)
Basically I work in IT and often have to manipulate folder structures or
large amounts of text files and am looking for the best way of automating
this procedure specifically through a programming language. I did Pascal,
and C++ in college (several years ago now)...
|
by: DR |
last post by:
how to determine what language a c# string is written in? is there any C#
method to take a string and return what language it is in? e.g. english,
hindi, spanish, etc.
|
by: DR |
last post by:
how to determine what language a string is written in? is there any method
to take a string and return what language it is in? e.g. english, hindi,
spanish, etc.
|
by: fscopel |
last post by:
The eternal question...
What language should I dedicate the beginning/most of my career to?
It seems pretty obvious that most programmers can code in more than one language, but they are more fluent in one than the other. I have some knowledge in VB .Net but I am just starting. This is a very general question so I’ll make it very specific,...
|
by: Larry__Weiss |
last post by:
Can a C# program find out what language an assembly (or components
thereof) is written in?
- Larry
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |