Talk:Pointers and references: Difference between revisions

From Rosetta Code
Content added Content deleted
(problem in Ada code)
Line 6: Line 6:
== Ada ==
== 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)
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)

== Added a practical example ==

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

Revision as of 14:46, 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)

Added a practical example

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