Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!cec2!news From: abed@saturn.wustl.edu (Abed M. Hammoud) Newsgroups: comp.lang.c Subject: Initializing arrays, an advise is needed. Message-ID: <1991May7.044811.27782@cec1.wustl.edu> Date: 7 May 91 04:48:11 GMT Organization: Washington University, St. Louis MO Lines: 29 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@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 | | +-------------------------------------------------+-----------------------+