Initialization

Peter Curran peterc at ecr2.UUCP
Fri Jun 7 21:54:42 AEST 1985


While we are on the subject of initialization...

Does the C standard address the issue of initializing large arrays.
Does it have something like the Fortran syntax "5 * 5" to initialize
five elements to the same value?  I realize you can type them in
if you really know the size, but that doesn't work too well if you
want the size to be controlled by a #define.

The solution right now is to write initialization code, either to run
when the program is started, or as a preprocessor of some sort generating
the required C code.  Neither is very satisfactory.



More information about the Comp.lang.c mailing list