R
Richard said:C&V, please.
From: Keith Thompson said:As I already told you, it invokes undefined behavior. That means
the standard imposes no requirements.
I suggest you get your own copy of
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
so you can look these things up yourself rather than depending on the
rest of us to do it for you.
So-and-So said:> Text that So-and-So wrote ...
Clearly this makes it totally useless for validating input.
I'll stick with my use of strscn etc. for semi-manual validation of input.
I'd be glad to do that if and when you please tell me how to view
such a file in a meaningful way over a VT100 terminal emulator.
In case of further questions as to my situation here, please study:
<http://www.rawbw.com/~rem/NewPub/mySituation.html>
There will be a test on that material the next time you post here.
.... snip ....... snip ...
I'd be glad to do that if and when you please tell me how to view
such a file in a meaningful way over a VT100 terminal emulator.
CBFalconer said:.... snip ...
You can get a bz2 compressed version of N869.TXT from:
<http://cbfalconer.home.att.net/download/>
FX-Mozilla-Status: 0009
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
Keith said:.... snip ...
I've dropped alt.support.shyness from the Newsgroups line.
From: Mark McIntyre said:It defines it as "a region of data storage... the contents of which
can represent values". This seems an entirely reasonable definition to
me. As someone has already said, the word has a wide variety of exact
meanings in many walks of life, so being precise is /not/
inappropriate.
This is pretty close to the C definition,
if you think it through.
I don't think Lisp required the block of memory to be complex.
The standard itself doesn't define region. You would have to check
back in ISO/IEC 2832-1:1993 "Information Technology - Vocabulary
Part1: Fundamental Terms" to see what ISO defined it as.
There's nothing which requires these to be contiguous, so I can'tif a particular compiler optimizes space by moving the long int
array ahead of either of the short int arrays to reduce amount of
padding needed to respect long boundaries, so that
a[7] a[8] c[0] c[1] c[2]
form a contiguous block of memory, is that considered a "region"
hence an "object"??
see how they can be considered either an object or a single region.
FWIW, the IAU had no need to define that since it can be inferred from
an amazing property known as "common sense".
From: Keith Thompson said:And what exactly do you mean by "ANSI"?
The current official C standard, C99, was issued by ISO (and
later adopted by ANSI).
The previous standard, which is still in wide use, is C90, also
issued by ISO (and adopted by ANSI).
I suggest avoiding the use of "ANSI" as an adjective; many people
still use "ANSI C" to refer to the language defined by the ANSI
C89 and ISO C90 standard documents, but strictly speaking that
usage is incorrect.
If you instead refer to "C90" or "C99", you avoid the ambiguity.
On the web page, I saw, there were two functions marked "GNU-c",
both of them incorrectly. Both functions are defined by C99, but
not by C90.
<OT>
The phrase "the GNU C version of the stdlib library" doesn't make much
sense, unless you're referring to glibc. I use gcc on Linux, where
the C runtime library is glibc. I also use gcc on Solaris, where the
C runtime library is the one provided by Solaris. gcc is a compiler,
not a complete implementation.
</OT>
Be careful with the term "original c" (or, preferably, "original C").
Versions of C existed long before the first ANSI standard.
n1124.pdf, referenced above, is the C99 standard with two
Technical Corrigenda merged into it. Any post-C99 chanages are
marked with change bars.
If a "region" can mean something like the Western USA, or the Great
Plains of the USA, which partly overlap with the former, or the
Mississippi River drainage area, which greatly overlaps with the
great plains, or the midwest, which overlaps with the drainage
area, or the "south" which overlaps with both the great plains and
the drainage area, or the East Coast which overlaps with the
"south", or New England which is a part of the East Coast, or the
USA which includes disconnected states Alaska and Hawaii plus
various disconnected islands such as Catalina, or the British
Empire at its hight which included disconnected parts all around
the Globe,
(At the machine level, and in MacLisp, it's possible to convert a
handle into a number representing the machine address of the entry
point of that object, then perform arithmetic to get any other
random numeric value, then convert that number back into a "handle"
onto some random new starting point where a user-level program may
or may not find something resembling a consistent object. That's
not what counts for user-level program getting access via the
handle.)
Now in C you are allowed to do exactly that sort of machine-level
manipulation of pointers,
Now if the C standard were to state clearly what constitutes
"reasonably accessible" per staying within a single allocation unit
(simple variable, array, struct, malloc-block, etc.) plus any
additional allocation units you can get by following pointers from
your starting unit, and define both objects and lvalues
consistently with respect to that understanding, and thus
guaranteeing (as much as possible) that programs restricted to such
access would be portable, I would like that.
But the "new and
wonderful" ANSI/ISO C standard we've been discussing doesn't do
that, so I rate it as crap in this respect.
.... snip ...
I have no way to view that here:
<http://www.rawbw.com/~rem/NewPub/mySituation.html>
I don't suppose you know of a plain-text or HTML version?
Robert said:So it would seem reasonable, in articles posted any time from about
2000 to the present and for a while in the fiture, to call it "ANSI
C", no??
I would consider that "old ANSI C", specifically "previous ANSI C".
Whatever is the **current** (latest official) standard.
At the moment, that seems to be C99.
Or whatever the GNU C compiler uses when the -ansi switch is turned
on. From the man pages here:
Please tell me whether GNU C MAN pages are referring to C99 or what?
Can you forgive me for reading the GNU C MAN pages and thinking the
jargon used in them was in any way acceptable here in the
newsgroup? (Especially after somebody here suggested that I use
both the -ansi and -pedantic switches, and somebody here suggested
I read the man pages?) I suspect you-all here have deliberately
baited me into looking at those man pages and using the jargon
therein, just so you could the slap me down for using it.
So it would seem reasonable, in articles posted any time from about
2000 to the present and for a while in the fiture, to call it "ANSI
C", no??
I would consider that "old ANSI C", specifically "previous ANSI C".
So you're forbidding me to use perfectly correct jargon, just
because some other people use the same jargon in an incorrect way?
What about C89 as an alternate designation for C90?
(ISO standardized it in 1989, but ANSI didn't join in approving it
until 1990, right. So from ISO's point of view, it's really C89?)
What term should I use to refer to the part of C that hasn't
changed from C89/C90 to C99, such as that if M and N are short
integers then M+N is an expression, of type short integer, that
results from adding M and N while discarding overflow (thus
wraparound)? For the most part, it's *that* language, the common
subset of C89/C90 and C99, that I want to describe in my
Cookbook/Matrix WebTree.
In any case, when I issue a gcc command on FreeBSD Unix, or on
RedHat Linux, in either case the gnu compiler goes ahead and links
in various library modules based on headers that I've specfied. I
I have no way to view that here:
<http://www.rawbw.com/~rem/NewPub/mySituation.html>
I don't suppose you know of a plain-text or HTML version?
What term should I use to refer to the part of C that hasn't
changed from C89/C90 to C99, such as that if M and N are short
integers then M+N is an expression, of type short integer, that
results from adding M and N while discarding overflow (thus
wraparound)?
pete said:The term you should use is:
"I make so many mistakes that they almost cancel each other out"
If M and N are short integers,
then M+N is an expression of type int and not of type short.
If (M+N) overflows, then the result is undefined.
ISO/IEC 9899:1999 (E)
Your browser may not have a PDF reader available. Google recommends
visiting our text version of this document.
Clicking on the link "text version" doesn't work. It just takes me
to another listing of search results. Google appears to be broken today.
If you know where there's a text version available please post the URL.
The San Francisco Bay Area is considered a region,
Common Sense says that Neptune hasn't cleared its neighborhood of
Pluto, and the Earth hasn't cleared its neighborhood of Luna, and
Jupiter hasn't cleared its neighborhood of Io or Europa or Ganymede
or Calisto. So none of those is a planet per IAU's 2006 definition???
Whatever is the **current** (latest official) standard.
At the moment, that seems to be C99.
[snip]Or whatever the GNU C compiler uses when the -ansi switch is turned
on. From the man pages here:
Please tell me whether GNU C MAN pages are referring to C99 or what?
Can you forgive me for reading the GNU C MAN pages and thinking the
jargon used in them was in any way acceptable here in the
newsgroup?
(Especially after somebody here suggested that I use
both the -ansi and -pedantic switches, and somebody here suggested
I read the man pages?) I suspect you-all here have deliberately
baited me into looking at those man pages and using the jargon
therein, just so you could the slap me down for using it.
So it would seem reasonable, in articles posted any time from about
2000 to the present and for a while in the fiture, to call it "ANSI
C", no??
I would consider that "old ANSI C", specifically "previous ANSI C".
So you're forbidding me to use perfectly correct jargon, just
because some other people use the same jargon in an incorrect way?
What about C89 as an alternate designation for C90?
(ISO standardized it in 1989, but ANSI didn't join in approving it
until 1990, right. So from ISO's point of view, it's really C89?)
What term should I use to refer to the part of C that hasn't
changed from C89/C90 to C99, such as that if M and N are short
integers then M+N is an expression, of type short integer, that
results from adding M and N while discarding overflow (thus
wraparound)? For the most part, it's *that* language, the common
subset of C89/C90 and C99, that I want to describe in my
Cookbook/Matrix WebTree.
Ah, that was because those functions were in both the original K&R
and also in C89/C90, and prior to 1999 were also in GNU C as a
nonstandard add-on, and I wasn't aware that C99 existed at the time
I wrote that. How do those paragraphs in my Matrix look now? Should
I perhaps flag them as C99, to warn users of older C systems?
As a more general question, which paragraphs of my Matrix document
currently define something that is in C99 but not C89/C90, such
that a warning about that would be appropriate?
How is that off-topic for comp.lang.c or for discussion of errata
in my Cookbook/Matrix WebTree?
What jargon would *you* use to include the compiler and the loader
and the libraries together as a transparent unit??
I thought it was clear already: "original c" means K&R.
Yes, that was long before any ISO or ANSI standard C.
Nobody disputes that fact. (Well, except for somebody like |-|erc.)
I have no way to view that here:
<http://www.rawbw.com/~rem/NewPub/mySituation.html>
I don't suppose you know of a plain-text or HTML version?
Why is it that the Common Lisp folks (well one of them, KMP,
anyway) have produced a nice HTML version of the ANSI standard:
<http://www.lispworks.com/documentation/HyperSpec/Front/>
and Sun Microsystems has produced equally good HTML documentation
for all their API, which is the default standard for Java, but the
idiots who have access to the ANSI standard (1999) C haven't
figured out how to do a similar thing for it? Is it really that
hard for somebody with PDF access to copy the text from the ANSI
C99 standard into a Web framework?
Keith said:Or you could call it "ANSI C89".
From: Yevgen Muntyan said:Just don't mention GNU-only functions at all.
Is this how *you* get the documentation? You should consider something
better, like C libraries manuals, man pages, C standard. man pages
are pretty good, they tell you about the standards given function
conforms to.
Don't write documentation about stuff you don't know.
From: Keith Thompson said:Overflow in sscanf() for any numeric type invokes UB (which, of
course, includes the possibility of raising a signal).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.