Global variables

Steven Schveighoffer schveiguy at yahoo.com
Wed Feb 20 07:05:58 PST 2008


"Saaa" wrote
>
> How are global variables accessed?
>
> If a function wants to read/write to one, will it get a reference to it or 
> a copy?
>
> (I should learn asm :)

All usage of global variables reference the same data.  If you want a copy, 
declare a local variable and copy the value of the global to the local 
variable.

-Steve 




More information about the Digitalmars-d-learn mailing list