From: osmium on 19 Dec 2009 11:40 "Francis Glassborow" wrote: > Antoon wrote: >> The size of a pointer is in no way related to the size of the object it >> points to. >> > That is a slight overstatement. With some limitations the size of a > pointer can (on some implementations is) different depending on the type. > All pointers to class types must be the same size and (I think) layout. > But pointers to enums can depend on the underlying type and pointers to > builtin types can vary in size. If x is a variable and y is a different variable, and given x, you can not determine y, or, given y you can not determine x, then the two variable are said to be unrelated. I think that is the meaning Antoon had in mind when he said they were unrelated. I found it a perfectly adequate explanation of the situation and needed no further "clarification".
From: Keith Thompson on 19 Dec 2009 12:24 "osmium" <r124c4u102(a)comcast.net> writes: > "Francis Glassborow" wrote: >> Antoon wrote: >>> The size of a pointer is in no way related to the size of the object it >>> points to. >>> >> That is a slight overstatement. With some limitations the size of a >> pointer can (on some implementations is) different depending on the type. >> All pointers to class types must be the same size and (I think) layout. >> But pointers to enums can depend on the underlying type and pointers to >> builtin types can vary in size. > > If x is a variable and y is a different variable, and given x, you can not > determine y, or, given y you can not determine x, then the two variable are > said to be unrelated. I think that is the meaning Antoon had in mind when > he said they were unrelated. I found it a perfectly adequate explanation of > the situation and needed no further "clarification". If you happen to know that y > x, then you can't determine the value of y given x or vice versa, but it would be incorrect to say that their values are "in no way related". The relationship is a relatively weak one, but it's there. I thought about raising the same point Francis did, though I probably would have said that it's a *very* slight overstatement. There can be a relationship between the size of a pointer and the size of the object it points to, but it's not a relationship that you can or should ever depend on. The point (and I think it's a minor one) is just that Antoon's phrase "in no way related" was slightly exaggerated. -- Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst> Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"
From: maigre_dragon on 21 Dec 2009 08:19 Thank you! I think what I need it. I need to think MemoryMap<T*> that is different goodly with MemoryMap<T> .
First
|
Prev
|
Pages: 1 2 Prev: How to read and write a float to file Next: New Commission Generated |