cancel
Showing results for 
Search instead for 
Did you mean: 

UDF Error

Former Member
0 Kudos

Hi,

I am working with one UDF. which giving me error "required: boolean if ( i = 2)"

my UDF Is

-


UDF to get 2nd value

for (int i =0 ; i <a.length; i++)

{

if ( i = 1)

result.addValue(a<i> );

}

Here I need to check when i=1 then only i need to add value in result.

Can you advice me...

regards,

Ansar.

Accepted Solutions (1)

Accepted Solutions (1)

nisarkhan_n
Active Contributor
0 Kudos

use "==" with single "=" it will assign the value niot check....

for (int i =0 ; i <a.length; i++)

{

if ( i == 1)

result.addValue(a );

}

Former Member
0 Kudos

yes phani it is working with "=="....thx

nisarkhan_n
Active Contributor
0 Kudos

reward points if helpfull......i thin it is Yes nisar not yes phani (-:

Former Member
0 Kudos

Yes...Made changes reward Points...

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

It should == instead of =

for (int i =0 ; i <a.length; i++)

{

if ( i == 1)

result.addValue(a );

}

Regards,

Shabari