can anyone please help me?

i have two decimal arrays l(15),r(15)
loop has to repeat for 16 times.l(15) , r(15) is the result i have to get.i wrote function F and it is executing perfectly.but atlast r(15) and l(15) is showing as system.decimal[].if i tested with ordinary variable other than array variable.its giving result.values are not passing to arrray


For b As Integer = 0 To 15
t = Decimal.Parse(r(b).ToString)
dim ta as decimal=Decimal.Parse(((l(b) And F(r(b)))).ToString)
'above line is working perfectly and its showing result.
r(b + 1) = Decimal.Parse(((l(b) And F(r(b)))).ToString)
'above line is not working.its giving result as system.deciamal[]
l(b + 1) = Decimal.Parse(t.ToString)
Next

First I don't know what F is returning. Is it a decimal?
Next you are converting a decimal to a string and then converting it back to a decimal. Big waste of resources. If F is returning a decimal then remove all Decimal.Parse.

Dim r(15), l(15) As Decimal
        Dim t As Decimal

        For b As Integer = 0 To 15
            t = r(b)
            Dim ta As Decimal = l(b) And F(r(b))
            r(b + 1) = l(b) And F(r(b))
            l(b + 1) = t
        Next

You are going to run into problems when b gets to 15 and try to set r(b+1) which is 16, You will get an index out of range error.

Thanks for ur help.
again another problem came in the code.for first round,its giving result but from 2nd round to 16th round,its giving same result. may be from second round,its taking 0s in l() and r().

i placed this form code in the following link.can you see and help me?
thanks in advance..
Download link: http://rapidshare.com/files/211518088/WindowsApplication.zip

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.