Initializing arrays, an advise is needed.

Abed M. Hammoud abed at saturn.wustl.edu
Tue May 7 14:48:11 AEST 1991


	Hello, I looked in the CFAQ and I wasn't able to find an
	answer to the following question. So please, any comments
	other than flames would be appreciated.

	I have a program that calls a routine multiple times while
	running. Every time the routine get called it have to calculate
	samples of a function say sin(x) and fill an array of like
	n values long. where n, is the same during a given run.

	My question is, is there a way to initialize the elements of
	the array in something like

	float a[n] = { sin(a0), sin(a1), ....., sin(a(n-1)) }

	I remember seeing some discussion about this before, but
	I couldn't remember what was concluded then.

	Any comments will be appreciated.

	Thanks a million, 

+-------------------------------------------------+-----------------------+
|Abed M. Hammoud				  | abed at saturn.wustl.edu |
|Washington University.				  | Office:               |
|Electronic Systems & Signals Research Laboratory.| -Voice:(314) 726-7547 |
|Department of Electrical/Biomedical Engineering. | -FAX:  (314) 726-4434 |
|St. Louis, MO , 63130 USA			  |                       |
+-------------------------------------------------+-----------------------+



More information about the Comp.lang.c mailing list