Thank you again Anatoliy. If anyone can help me through another hurdle, I would appreciate it greatly. If you have read the thread you know I'm trying to access a dll that takes fairly complex structures as parameters through fox. The element pfY in the structure below needs to be initialized before the call. In the code below you can see the following statement:
_fcpSeries.pfY = &(historyArray[0]); How can I represent this in Fox before I make the call to my dll?
struct _series
{
int nLen; // In: Length of historic data
int nHorizon; // In: Forecast horizon
int nPpc; // In: Periods per seasonal cycle
float* pfY; // In: Historic data (nLen)
float* pfEvents; // Out: NULL or event codes (nLen+nHorizon)
float* pfPoint; // Out: Fitted values and forecasts
//( nLen+nHorizon)
float* pfUpper; // Out: Upper confidence limits
//(nLen+nHorizon)
float* pfLower; // Out: Lower confidence limits
//(nLen+nHorizon)
float* pfStock; // Out: Safety stocks (nHorizon)
float* pfWeight; // Out: NULL or data weights (nLen + nHorizon)
float* pfIndex; // Out: NULL or seasonal indexes
//(nLen + nHorizon)
};
historyArray[0] = 100;
historyArray[1] = 200;
historyArray[2] = 300;
historyArray[3] = 400;
historyArray[4] = 500;
historyArray[5] = 600;
historyArray[6] = 700;
historyArray[7] = 800;
historyArray[8] = 900;
historyArray[9] =1000;
historyArray[10]=1100;
historyArray[11]=1200;
_fcpSeries.nLen = 12 ; //Length of historic data array
_fcpSeries.nHorizon = 12 ; //Forecast horizon
_fcpSeries.nPpc = 12 ; //Number of periods per seasonal cycle
_fcpSeries.pfY = &(historyArray[0]) ;
//Pointer to historyArray array
_fcpSeries.pfEvents= 0; //Pointer to events array
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement