By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,579 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,579 IT Pros & Developers. It's quick & easy.

array ref problem

P: n/a
Possibly because you've called one variable "waveform" and
the other "waveforms"?

-Mendhak
[MVP - VB]

-----Original Message-----
I have problems due to array using the by ref values

The things creates problem when the waveform value is greater than 2
when the if loop is run with waveform value is 3

when the values of temporaryarray1 is cleared the values of ww array are also changed as the values are by ref.

Is there a way by which I can overcome this problem
ww = chartcalculations(number)
If waveform > 1 Then
For counter = 2 To waveforms
delay = 20 totaldelay = totaldelay + delay
temporaryarray = chartcalculations(counter - 1)
array.Clear(temporaryarray1, 0, 1000)
Array.Copy(temporaryarray, 0, temporaryarray1, CLng(totaldelay), CLng(length - 1))
For counter2 = 0 To (length + totaldelay - 1)
ww(counter2) = ww(counter2) + temporaryarray1(counter2) Next counter2

Next counter
End If

For counter = 0 To (length + totaldelay - 1)
fmain.Chart1.Series("Series1").Points.AddXY(counte r, ww(counter)) Next counter

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>t5uaP0OSp0exD9mbHOt0KA==</Id>
.

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.