have a look:
Code:
#include <acknex.h>

//

void populate_array(int * array, int arraySize, void * getNextValue)
{
	int i;
	for(i = 0; i < arraySize; i++)
	{
		int TempFunction(); // temporary function
		TempFunction = getNextValue; // set function pointer
		
		array[i] = TempFunction(); // execute function
	}
}

int getNextRandomValue(void)
{
	return (int)(random(1000));
}

void main()
{
	fps_max = 60;
	
	random_seed(0); // initialize random seed
	
	//
	
	int MyArray[8]; // create array
	
	populate_array(MyArray, 8, getNextRandomValue); // fill array with return values of function "getNextRandomValue()"
	
	printf("Array Content: (%d, %d, %d, %d, %d, %d, %d, %d)", 
		MyArray[0], MyArray[1], MyArray[2], MyArray[3],
		MyArray[4], MyArray[5], MyArray[6], MyArray[7]);
}

It's a strange work-around but it works. Note that this is a lite-c-only thing, I don't think this would work in C.


POTATO-MAN saves the day! - Random