i am changing the list, as this is not relevant for pike users.
On Tue, May 18, 2004 at 03:46:44PM +0200, Martin Stjernholm wrote:
mixed m; typeof(m);
(1) Result: mixed
typeof([int] m);
(2) Result: int
Only the type is changed, hence a type cast. A normal cast like (int) "1" changes the value, hence a value cast.
the difference is than that [type] only changes the variable but not its value, whereas (type) changes both.
in other languages (see the c and java examples), the term "type cast" is used to describe the first case where where both variable and value are changed.
hence i think it is a bad idea to use a different definition in pike. coining new terms is fine, but chaning existing ones will lead to confusion.
"variable cast" might work.
greetings, martin.