To simplify this question even further, I think what I'm asking is...

How do access the 'current' value of the array DCPhase below...??

I don't mean the first value (DCPhase[0]) or the last value
(DCPhase[BarCount-1]), but the 'current' value...

Is there a way of doing this...?

Obviously I can't simply use DCPhase in this context because it
returns an array.

Help appreciated.


--- In [email protected], "sidhartha70" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
> 
> Probably a very simple code enquiry.
> 
> I have an array whose 'current' value I want to use to define the
> length of a for...next loop.
> 
> Lets say,
> 
> DCPeriod=int(SmoothPeriod+0.5);
> for(Countx=0;Countx==DCPeriod-1;Countx++)
> {
> RealPart=RealPart+sin(DTR*(360*(I2/Q2))*(SmoothX[Countx]));
> ImagPart=ImagPart+cos(DTR*(360*(I2/Q2))*(SmoothX[Countx]));
> }
> 
> Obviously this won't work... because DCPeriod is an array.
> 
> My question how do I access the 'last' value of DCPeriod...?
> 
> I have tried LastValue(DCPeriod) and it doesn't match DCPeriod when I
> output them to the title bar for error checking...
> 
> What am I doing wrong guys...?
>


Reply via email to