Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #7022

Re: what about my array type?

Message-ID <4E081602.7842@mindspring.com> (permalink)
Date 2011-06-27 01:32 -0400
From pete <pfiland@mindspring.com>
Organization PF
Newsgroups comp.lang.c
Subject Re: what about my array type?
References <4e076731$0$44197$4fafbaef@reader1.news.tin.it> <t7mf07d716olfv14kqcem0dalkhksue6po@4ax.com> <4e0810a9$0$15669$4fafbaef@reader2.news.tin.it>

Show all headers | View raw


io_x wrote:
> 
> "Barry Schwarz" <schwarzb@dqel.com> ha scritto nel messaggio
> news:t7mf07d716olfv14kqcem0dalkhksue6po@4ax.com...
> > On Sun, 26 Jun 2011 19:08:36 +0200, "io_x" <a@b.c.invalid> wrote:

> >>when someone has "a=3"
> >>than is possible to have &a, but why not &3?
> >>where &3 means the place in the memory [address]
> >>where there is stored the value 3
> >
> > What makes you think that the value 3 must be stored somewhere in
> > memory?
> 
> because here is in the memory, it could be in section data
> can be in section text, for example the instruction
> mov eax, 3
> has in the code section, in the space reserved for store the memory
> for this instruction, has the number 3
> there is one addres in the executable that contai 3

That just happens to be that way on the C implementation
that you are using right now.

There's no rule in C which specifies how
   a = 3;
must be translated.

   a = 3;
only means that after the statement is executed,
that (a) will have a value of 3.

If the statement were
   a = 0;
instead, then it might be translated as a (clear) 
instruction, rather than as a (mov) instuction.


-- 
pete

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

what about my array type? "io_x" <a@b.c.invalid> - 2011-06-26 19:08 +0200
  Re: what about my array type? Barry Schwarz <schwarzb@dqel.com> - 2011-06-26 18:38 -0700
    Re: what about my array type? Keith Thompson <kst-u@mib.org> - 2011-06-26 19:30 -0700
    Re: what about my array type? "io_x" <a@b.c.invalid> - 2011-06-27 07:11 +0200
      Re: what about my array type? pete <pfiland@mindspring.com> - 2011-06-27 01:32 -0400
      Re: what about my array type? Keith Thompson <kst-u@mib.org> - 2011-06-26 22:36 -0700
        Re: what about my array type? "io_x" <a@b.c.invalid> - 2011-06-27 10:04 +0200
          Re: what about my array type? Keith Thompson <kst-u@mib.org> - 2011-06-27 08:27 -0700
      Re: what about my array type? Barry Schwarz <schwarzb@dqel.com> - 2011-06-27 06:04 -0700
    Re: what about my array type? "io_x" <a@b.c.invalid> - 2011-06-27 11:11 +0200
  Re: what about my array type? "io_x" <a@b.c.invalid> - 2011-06-27 09:36 +0200
    Re: what about my array type? Barry Schwarz <schwarzb@dqel.com> - 2011-06-27 06:04 -0700

csiph-web