Re: A note on computing thugs and coding bums



[In deference to Phlip, all Nilges's polemic, rhetoric, abuse, etc has been
snipped after only the briefest scanning to identify its nature, without
actually reading it; this reply focuses purely on the technical part of
Nilges's reply, which is of course broken and needs addressing. CAVEAT: I
have not bothered to indicate where polemic, rhetoric, abuse and other
such idiocies have been snipped. Refer to the parent article if you care
enough.]

spinoza1111 said:

On Jan 12, 2:50 pm, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:

But I think you [i.e. Ben Bacarisse] need a rider on your claim. I'm
sure you meant that the
code is valid for any character set that is legal in C (which is a very
unrestrictive language, but which does impose /some/ restrictions on
character sets - specifically, that the values of characters in the
required source character set (other than null) must be positive, that
null must be 0, and that '0' to '9' are contiguous).

Non restricted ASCII characters beyond 127 aren't positive if bytes
are signed.

There aren't any ASCII characters beyond 127. It's a 7 bit code. We covered
that, remember? But to answer your substantive point, yes, if bytes are
signed AND are only eight bits wide, then this does mean that all the
required source character set characters must have values in the range
0-127 (with the 0 obviously being assigned to the null character).

You forgot to add that Nul (not "null", please, that names something
different)

In C, the Standard defines the null character as the character with value
0. More formally: "A byte with all bits set to 0, called the null
character, shall exist in the basic execution character set" - C89: 2.2.1

Since the context is C, I am using C terminology. If you wish to use the
word "null" for something else instead, that's up to you, but I have made
my usage precisely clear by citing the source of my definition. I have no
qualms about using the appropriate term ("the null character", sometimes
abbreviating it to "null" just as we abbreviate "the space character" to
"space", etc), whether you like it or not.

must occur somewhere oh what the hey after the character
set or some stupid thing will happen.

No, it must have the value 0, and must be a part of the character set.
Because some code point values must follow it (i.e. have positive values),
it cannot be at the end, so in no sense does it come "after the character
set".

This isn't a library dependency.
It's implicit in Rob's processing of a final asterisk!

Not so. The asterisk character is one of the required source character set
characters, and must therefore have a positive value. It must therefore
succeed the null character (not necessarily directly - i.e. other
characters may and generally do come between them); the null character
cannot have a higher code point than the asterisk character. This is one
of the restrictions of which I spoke earlier on character sets usable with
conforming C implementations.

An address points OUTSIDE the region it is meant to point at.

You lost me. Could you please explain what this has to do with character
sets?

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.



Relevant Pages

  • Re: A note on computing thugs and coding bums
    ... code is valid for any character set that is legal in C (which is a ... characters in the required source character set ... A String, in C Sharp or Java, can be redefined. ... allow programmers to handle some other data format, ...
    (comp.programming)
  • Re: [QUIZ] Bytecode Compiler (#100)
    ... So having written the lexer class, I now set up the state transition ... The tokens are ... # The lexer needs to know the character sets involved in deciding ... # Initialize the character set columns to be used by the lexer. ...
    (comp.lang.ruby)
  • Re: include file rule
    ... except the new-line character and " '. ... Looking at 5.2.1 Character Sets, the source character set is described ... 26 uppercase letters ... library files with members having at most eight character names in ...
    (comp.lang.c.moderated)
  • Re: A note on computing thugs and coding bums
    ... code is valid for any character set that is legal in C (which is a ... characters in the required source character set ... the C Standard endorses that decision subject only ... use another definition of the word "string", that's entirely your choice, ...
    (comp.programming)
  • Re: A note on computing thugs and coding bums
    ... code is valid for any character set that is legal in C (which is a very ... required source character set characters must have values in the range ... assume that the character string will be terminated by a Nul. ...
    (comp.programming)