POV-Ray : Newsgroups : povray.off-topic : Another "This is why I..." : Re: Another "This is why I..." Server Time
6 Sep 2024 01:26:37 EDT (-0400)
  Re: Another "This is why I..."  
From: Warp
Date: 27 May 2009 15:14:40
Message: <4a1d911f@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Or, maybe more clearly....

> a = 5; b = a; a++;

> This doesn't change the value in 'b'.

  I don't even understand why it should, if you are handling value-based
variables.

> You're not incrementing the value in 
> 'a'. You're replacing the value in 'a' with a new value.

  "a++" probably results in an assembler machine code which makes the CPU
increment the value of a memory location by one. Exactly how the bits go
through the transistors in order to achieve this feels irrelevant. It's
the end result that matters: You modified the value of the variable.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.