Category talk:C: Difference between revisions
Content added Content deleted
Line 14: | Line 14: | ||
I was taught that C ''always'' passes parameters by value, and that it simulates pass-by-reference by passing (by value) the address of the entity being referred to. I suppose it is the difference between passing a thing and passing the name of the thing… —[[User:Dkf|Dkf]] 10:07, 31 May 2009 (UTC) |
I was taught that C ''always'' passes parameters by value, and that it simulates pass-by-reference by passing (by value) the address of the entity being referred to. I suppose it is the difference between passing a thing and passing the name of the thing… —[[User:Dkf|Dkf]] 10:07, 31 May 2009 (UTC) |
||
: The only way to do a reference to a "thing" is a pointer indeed. In C this is explicit. In other languages it is not... But pointers are the way C calls "by reference", so function(&c) is a passing of c by reference... then the reference can be dereferenced... not simulation! --[[User:ShinTakezou|ShinTakezou]] 13:46, 31 May 2009 (UTC) |
: The only way to do a reference to a "thing" is a pointer indeed. In C this is explicit. In other languages it is not... But pointers are the way C calls "by reference", so function(&c) is a passing of c by reference... then the reference can be dereferenced... not simulation! --[[User:ShinTakezou|ShinTakezou]] 13:46, 31 May 2009 (UTC) |
||
:: That's not call by reference. That's passing the address of the thing by value... ;-) —[[User:Dkf|Dkf]] 13:55, 31 May 2009 (UTC) |
Revision as of 13:55, 31 May 2009
"C++" and "C plus plus" should be merged. Sgeier 18:51, 1 February 2007 (EST)
- Yes, they should, but I can't get to the C++ articles right now--I don't even know how someone managed to create them! This version of MediaWiki (1.8.2) doesn't support the creation of pages with + in their name. I'm going to upgrade this weekend to 1.9.1, which does support it. Merging C++ and C plus plus will be the first thing I do.
- It's been bugging me since I started the projecct, but when I found out how to fix the + problem, traffic was still too high for me to take the site down long enough to do the upgrade. --Short Circuit 19:10, 1 February 2007 (EST)
C++ problem
I can't get to the C++ page. You can try it on that link there. It just takes you to C. RCBF(C++) has a problem too: http://rosettacode.org/wiki/RCBF_(C++) --Mwn3d 10:25, 7 February 2008 (MST)
- Ugh. This was fixed with a Mediawiki upgrade in November. I don't know what broke it again. --IanOsgood 10:46, 7 February 2008 (MST)
- It may have been broken again in the maintenance on Sunday. --Mwn3d 10:49, 7 February 2008 (MST)
Language Features
I was taught that C always passes parameters by value, and that it simulates pass-by-reference by passing (by value) the address of the entity being referred to. I suppose it is the difference between passing a thing and passing the name of the thing… —Dkf 10:07, 31 May 2009 (UTC)
- The only way to do a reference to a "thing" is a pointer indeed. In C this is explicit. In other languages it is not... But pointers are the way C calls "by reference", so function(&c) is a passing of c by reference... then the reference can be dereferenced... not simulation! --ShinTakezou 13:46, 31 May 2009 (UTC)
- That's not call by reference. That's passing the address of the thing by value... ;-) —Dkf 13:55, 31 May 2009 (UTC)