on 2008 Nov 19 4:29 AM
Hi,
i am getting small problem in the context change..
i have input as
1
2
3
[3]context change
4
5
[5]conext change
6
7
8
[8]context change
i want out put as
2
3
[3]conext change
5
[5]context change
7
8
[8]context change
my requirement is the element after context change in the input sholud be deleted.
Thank you,
Madhav.
Hi Madhav,
You have to write UDF for this.
In that check for
ResultList.CC (it will check if there is any context change) if true then increment the counter else add result.addValue(Value).
Thanks
Sunil Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhav,
Try This
for(int i=0;i<a.length;i++)
{
if(a<i>.equals(ResultList.CC))
{
result.addValue(ResultList.CC);
i++ ;
}
else
result.addValue(a<i>);
}
"if(a.equals(ResultList.CC))" it should be a(i) but in rect bracket ,Dont know why it is not showing the same in above code
Thanks
Sunil Singh
Edited by: SUNIL SINGH on Nov 19, 2008 5:57 AM
Edited by: SUNIL SINGH on Nov 19, 2008 5:59 AM
Hi,
Try this code
for(int i=0;i<a.length;i++)
{
if(a<i>.equals(ResultList.CC))
{
result.addValue(ResultList.CC);
i++ ;
}
else
result.addValue(a[i++]);
}
SUNIL, The Reply section contains some functionality on top of the pad like Bold characters,Italic characters, sidewise you will find an icon with tool tip (click to display as java code), you just need to select the code you written and click on the icon, that will always disply your code exactly as you wrote.
Thanks!
Thanks SANV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
You could write a user-defined function to do so!
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
i have written a UDF, but it is not working proprly, it is not identifying the context change
this is the UDF i have written,
//write your code here
for(int i=0;i<a.length;i++)
{
if(a<i>.equals(result.CC))
{
result.addValue(a[i+1]);
}
else
result.addValue(a[i++]);
}
in the above UDF the it is giving out put from the else part only...
it will gr8 help if any one can correct my UDF.
Thank you,
Madhav.
User | Count |
---|---|
65 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.