[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bizaro code



PureBytes Links

Trading Reference Links

GetVecQQ (2, LkAhead-1, &Predict);"

At some point in your code you have a dll specified which has a routine
called getvecQQQ. getVecQQQ when called by your easylanguage code passes a
number of variables viz: 2 and lkAhead and returns Predict. The & refers to
Predict's memory address which will be updated in the dll. Think of it as
just how one adresses dlls.

Hope that makes sense.

----- Original Message ----- 
From: "c" <camacazi@xxxxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Monday, September 27, 2004 4:02 PM
Subject: Bizaro code


>
>
> Howdy all
>
> Am i on drugs ...or does this function look broken/wrong.
>
> The function is called RSMemPred.
> The last line says "RSMemPred=Predict;"
> Then wouldnt it always be '0' considering thats the variable value it was
> given at the beggining? No other "predict=" statements exist.... unless it
> has something to do with the second last line
> "   GetVecQQ (2, LkAhead-1, &Predict);"
>
> If so what does the '&' signify ?
>
> Looks 'bizaro world' code to me .... but then again i have missed the
> obvious before.
>
> I hope someone can shine some light on this for me :O)
>
> Cheers
> Cameron
>
>
>
>
>
>
> Inputs:
> Series(NumericSeries),WinSize(Numeric),Poles(Numeric),LkAhead(Numeric);
>         DefineDLLFunc:"TSNNL.DLL",INT,"SetVecQQ",INT,INT,FLOAT;
>     DefineDLLFunc:"TSNNL.DLL",INT,"GetVecQQ",INT,INT,LPFLOAT;
>     DefineDLLFunc:"TSNNL.DLL",INT,"DoMesaCalc",INT,INT,INT,INT;
>
> DefineDLLFunc:"TSNNL.DLL",INT,"DoMesaExtrap",INT,INT,INT,INT,INT,INT;
>
> DefineDLLFunc:"TSNNL.DLL",INT,"GetMesaPower",INT,INT,INT,FLOAT,LPFLOAT;
> {
> We also need to declare some variables to use in our Easy Language
> calculations:
> an index variable (k), the number of data points minus one (na), and the
> number of poles to use in the model (np). }
>     vars: Counter(0),DeTrVal(0);
>     Vars: Predict(0),RetVal(0);
>     DeTrVal=DeTrend(Series,6,20);
>     for counter = 0 to WinSize begin { WinSize+1 data
> points }
>     SetVecQQ ( 0, WinSize-counter,DeTrVal[counter]); { place
> in vector
> register }
>     end;
>     DoMesaCalc (0, 1, WinSize+1, Poles);
>     DoMesaExtrap (0, 1, 2, WinSize+1, Poles, LkAhead);
>        GetVecQQ (2, LkAhead-1, &Predict);
>         RSMemPred=Predict;
>
> ---
>
>
>