Re: segfault w/ block, but not file scope



Richard Heathfield <invalid@xxxxxxxxxxxxxxx> writes:
> M.B said:
[...]
> I've never been to ur. I repeat that C does not have pass by reference. If
> you disagree, show me the part of the C Standard that supports your
> viewpoint.
>
>> C iimplements this by pointers.
>
> In C, pointers are passed by value.

I think M.B has a point, though he didn't state it particularly
coherently.

No, the C doesn't directly support pass by reference, but, like many
other things, it does support it indirectly.

C doesn't support linked lists or binary trees, but they can easily be
implemented in C.

We all know what the relevant features of the C language are and how
they can be used to implement what other languages might implement
more directly. The only argument here is about the meaning of the
statement "C has pass-by-value" or "C supports pass-by-value"; this
debate would perhaps be more appropriate in an English usage
newsgroup.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Re: C++ has Boost libraries, C?
    ... How can a language without objects support operator overloading? ... For reference, what you've done here is create an object. ... The point is that C does support the creation of objects. ... What it doesn't support is operator overloading, ...
    (comp.lang.c)
  • Re: segfault w/ block, but not file scope
    ... > does not support 'pass by reference'. ... > was about a mechanism of the language and not something you implement ... you mean to say the value of a pointer ...
    (comp.lang.c)
  • Re: C++ has Boost libraries, C?
    ... For reference, what you've done here is create an object. ... the language remains ... The point is that C does support the creation of objects. ... What it doesn't support is operator overloading, ...
    (comp.lang.c)
  • Re: segfault w/ block, but not file scope
    ... >> does not support 'pass by reference'. ... >> was about a mechanism of the language and not something you implement ... Technical terms often have meanings that are not quite the same as ...
    (comp.lang.c)
  • Re: Question on LSP
    ... not have to be explicit attributes, ... Since objects in memory usually don't move, the language can largely hide the identity mapping. ... My issue here is that whatever semantic meta model the language uses, there must be some way for the developer to unambiguously express the OOA/D is-a semantics for some problem space entity. ... Note that the language allows us to use a name like 'T' on the reference as a mnemonic so that the developer can keep track of what is happening with the indirection. ...
    (comp.object)