Re: char**



On Sun, 31 Aug 2008 01:23:20 -0700, Keith Thompson <kst-u@xxxxxxx>
wrote:

Barry Schwarz <schwarzb@xxxxxxxx> writes:
On Sat, 30 Aug 2008 10:55:21 +0000, Richard Heathfield
<rjh@xxxxxxxxxxxxxxx> wrote:
MN said:

I have a question :
How to understand the mean of char** type ?

char is a type - objects of that type are 1 byte in size and can contain as
their value any single member of the execution character set.

char is an integer type and an object of that type can contain any
value between CHAR_MIN and CHAR_MAX, inclusive (independent of whether
the value represents a member of the execution character set).
[...]

If I'm reading C99 5.2.1 correctly, the execution character set *is*
the complete set of values from CHAR_MIN to CHAR_MAX. (This is
distinct from the "basic execution character set".)

I wonder. Consider:

1 - If char is signed, then a variable of type char can
obviously hold a negative value.

2 - Functions like fgetc should be able to handle the entire
execution character set.

3 - fgetc will treat any character it reads as unsigned and
will return only a non-negative value (promoted to int).

Therefore, it seems there are char values which are not part
of the execution character set.




--
Remove del for email
.



Relevant Pages

  • Re: casting to unsigned char for is*() and to*() functions
    ... the C standard says that all members of the execution characterset ... chracter set" and "basic execution character set," described ... it is safe to say that toupperonly works on positive char ...
    (comp.lang.c)
  • Re: Public disclosure of discovered vulnerabilities
    ... Specifically ASCII source and EBCDIC execution. ... until after compilation). ... >was the execution character set of the assembler. ... >> many other reasons as well, but IBM and others believed that char ...
    (sci.crypt)
  • Re: Public disclosure of discovered vulnerabilities
    ... >>implementations MUST have char as an unsigned char. ... > the source character set and storing into objects both make sense. ... I have seen assemblers where the source and execution character ...
    (sci.crypt)
  • Re: char**
    ... How to understand the mean of char** type? ... their value any single member of the execution character set. ... the value represents a member of the execution character set). ... and can contain as their value the address of a single char *. ...
    (comp.lang.c)
  • Re: unsigned char, char, signed char and all that
    ... use with members of the basic execution character set in mind. ... where int was much wider than char, ... was sometimes an issue when char was signed. ...
    (comp.std.c)