Talk:Pointers and references: Difference between revisions

From Rosetta Code
Content added Content deleted
(task is a bit vague?)
 
No edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Perhaps there should be a cannonical set of "common operations" here? --[[User:Rdm|Rdm]] 18:01, 2 August 2010 (UTC)
Perhaps there should be a cannonical set of "common operations" here? --[[User:Rdm|Rdm]] 18:01, 2 August 2010 (UTC)

: Since each language has slightly different semantics for pointers and/or references, I don't think you can make a canonical list of "common operations" which is language independent. --[[User:Ce|Ce]] 18:06, 2 August 2010 (UTC)
:: Are the semantic differences classifiable? For language operations which are "X-like", can some set of Xs be identified?--[[User:Short Circuit|Michael Mol]] 00:44, 3 August 2010 (UTC)

== Ada ==
There's something odd in the ''References'' subsection : one declares a type, and no variable, and the loop and array index are made on the type, not on a variable ? Looks wrong, even though I'm a beginner in Ada. Probably same problem with Ada 2012 example. [[User:Nochnix|Nochnix]] 15:54, 9 February 2012 (UTC)

== C: Added a practical example ==

I've added a minimal, practical example of pointers using C that shows how useful pointers are. Hope it'll be useful!
--JBF8088 (Hi there! =D) 14:46, 4 November 2015 (UTC)

Latest revision as of 14:47, 4 November 2015

Perhaps there should be a cannonical set of "common operations" here? --Rdm 18:01, 2 August 2010 (UTC)

Since each language has slightly different semantics for pointers and/or references, I don't think you can make a canonical list of "common operations" which is language independent. --Ce 18:06, 2 August 2010 (UTC)
Are the semantic differences classifiable? For language operations which are "X-like", can some set of Xs be identified?--Michael Mol 00:44, 3 August 2010 (UTC)

Ada

There's something odd in the References subsection : one declares a type, and no variable, and the loop and array index are made on the type, not on a variable ? Looks wrong, even though I'm a beginner in Ada. Probably same problem with Ada 2012 example. Nochnix 15:54, 9 February 2012 (UTC)

C: Added a practical example

I've added a minimal, practical example of pointers using C that shows how useful pointers are. Hope it'll be useful! --JBF8088 (Hi there! =D) 14:46, 4 November 2015 (UTC)