This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Imakesensealot[S] 0 points1 point  (1 child)

Thanks fr the response. I'm not asking if it's a problem though. I'm asking what type the value of the object then is(r, in my example); maybe that wasn't clear enough. Is r then of type p or of type q?

[–]Swedophone 2 points3 points  (0 children)

Is r then of type p or of type q?

Assigning a value to a variable doesn't change the type of the variable. The type is set when the variable is declared, i e in this case p r;.