const, final, scope function parameters

Regan Heath regan at netmail.co.nz
Sun May 27 13:38:35 PDT 2007


Regan Heath Wrote:
> Because classes and arrays are reference types and int is a value type I believe this code is legal and does not violate scope.
 
<snip typo!>
 
> void foo(A aa, char[] bb, int cc)
> {
>   aaa = aa;
>   bbb = bb;
>   ccc = cc;
> }

Gah!  Sorry typo there, try these:

//variables in a higher scope 
A aaa;
char[] bbb;
int ccc;

Regan



More information about the Digitalmars-d mailing list