[vox-tech] C question: global vs local const

Peter Jay Salzman vox-tech@lists.lugod.org
Thu, 17 Jan 2002 15:58:38 -0800


begin Mark K. Kim <markslist@cbreak.org> 
> You're initializing K with a variable.  Because globals are calculated at
> compile time,

i didn't know this distinction between globals and locals.  i understand
the error now.

> you cannot have variables in the initialization of globals
> (since a variable's value is not determined until runtime).  And yes,
> const variables are still variables,

> and const variables are overwritable
> under certain architectures by indirectly dereferencing it (but not on x86
> Linux).
 
ah.  i didn't know this either.  ok.  i've changed them to #define's.

thanks mark!
pete