Re:What Time Is It on the International Space Station? (2013)
by thomastjeffery on Sunday March 11, 2018 @08:26PM
(#16565461)
Think of it as two pointers referencing the same data:
[ Parent
| on HN ]
Re:What Time Is It on the International Space Station? (2013)
by TheSoftwareGuy on Sunday March 11, 2018 @11:53PM
(#16566105)
Your example with pointers actually wouldn't compile, and I think the analogy you are trying to make is not accurate. On the second line you are assigning the target address of `GMT` to be the value pointed to by UTC. In other words you are trying to assign a value of type "Time" to an object to type "Pointer-to-Time".
If, however you meant for that line to be: Time *GMT = UTC;
it would compile fine, but then your second comparison would evaluate to true, and the whole analogy be rather pointless.
Re:What Time Is It on the International Space Station? (2013)
by thomastjeffery on Monday March 12, 2018 @05:48PM
(#16571990)
What I meant was to have them both point to the same data, but be different objects.
Sure, C wouldn't work that way, but it's just supposed to be pseudocode anyway.