|
Posted by Michael Fesser on 09/24/07 21:22
..oO(Steve)
>"gosha bine" <stereofrog@gmail.com> wrote in message
>news:46f823bf$0$31121$6e1ede2f@read.cnntp.org...
>>
>> Please read the chapter called "references are not pointers" in the
>> manual.
>
>'chapter' ? oh, you mean the quoted text of a usenet post? may i ask, who is
>jani?
From the manual (not the UCNs):
| They are not like C pointers; instead, they are symbol table aliases.
| Note that in PHP, variable name and variable content are different, so
| the same content can have different names.
>gosha, you'd be wise at this point to draw the distinctions yourself (if not
>capable, use a supported reference [no pun]). but, since references provide
>identical behaviors to pointers
They don't. A pointer contains an address in memory, which could be a
variable or the entry point of a function. You can even point to a
pointer to a pointer - a thing that _cannot_ be done with references,
because a reference is just an alias name for something.
>the only difference that i see is the
>literal words themselves (one, 'pointer', the other, 'reference')...and
>perhaps some symantics somewhere.
Even in C/C++ pointers and references are two different concepts.
>as it is, REFERENCES like POINTERS speak to POINTING TO AN ADDRESS or a COPY
>OF A VALUE AT AN ADDRESS...which is EXACTLY WHAT A POINTER IS/DOES.
Correct, but that's not what a reference does.
Micha
Navigation:
[Reply to this message]
|