Sun, 01 Apr 2001 07:42:20 GMT, deadmeat <root@[127.0.0.1]> pisze: > the first thing a newbie will do is play with simple integer > values. a = 1;b = a; a = 2; leaves you with a and b of different > values. So it appears b = a copies the value from b to a because > changing a does not affect b. It doesn't imply that. a=2 cannot change the value of b no matter what. If = copies values, then b=a makes a copy of a and a=2 does not alter b. If = copies references, then a=2 makes a new reference to 2. In neither case a=2 changes the value of b, so how could you expect that? The language would have to be inconsistent if a=2 changed b. -- __("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTĘPCZA QRCZAK
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4