Renaming versus initialisation



Hi

Assuming the following declarations:

type T is ...;

function F return T is ...;

I'm a bit uncertain about the difference of the following declarations:

V1 : T := F;
V2 : T renames F;

I'd like to see an explanation of the effect of an object renaming
declaration versus variable declaration and initialisation, when the object
being renamed is a return value of a function. Many thanks for it.

--
Tapio
.



Relevant Pages

  • Re: Bus error
    ... A programmer construing strange assumptions about the possibility of ... duplicate names in a declarative part of an Ada program, ... and in fact X: T renames X; ... You can't have two declarations with the same name ...
    (comp.lang.ada)
  • Re: Strange behavior using a module which uses another module
    ... recursion levels. ... But again, we're not talking about multiple declarations, just ... Obviously conflicting renames in the same scope would ...
    (comp.lang.fortran)
  • Re: natural join
    ... > know what you have done until you see both table declarations. ... > better to have explicit column names. ... Given that almost all production databases have column CREATED_ON, ... Prev by Date: ...
    (comp.databases)
  • Re: Creationist Theory
    ... >>CT predicts the claims and declarations found in the Bible, ... It means "once Gene Scott tells him what it says". ... >>Ray Martinez ... Prev by Date: ...
    (talk.origins)
  • Re: Overloading and pointers
    ... I changed my demo to real,pointer declarations and that was acceptable to ... CVF as well, giving the ... same test outputs. ... Prev by Date: ...
    (comp.lang.fortran)