08-07-2012, 08:24 PM
Hi All,
In above function I am comparing two List (i.e :-Exp_vaues,Act_values). Then I would like to print the missed values in second list which is present in first. Now I'm getiing Output like below,
Output:-
Spain not found in Actual Values list
Russia not found in Actual Values list
Mexico not found in Actual Values list
Germany not found in Actual Values list
But I would like to print all the missed values in one statement(E.g:-Spain,Russia,Mexico,Germany not found in Actual values list)
Pls help me to get solution for this.
Code:
Call compare_values()
Function compare_values()
Exp_Values="India,Spain,Japan,Singapore,Russia,China,Mexico,England,Germany"
Spl_Exp_Values=split(Exp_values,",")
Act_values="India;Japan;Singapore;China;England"
Spl_Act_values=split(Act_values,";")
For i=0 to Ubound(Spl_Exp_values)
flg=0
For j=0 to Ubound(Spl_Act_values)
comp=Strcomp(Spl_Exp_Values(i),Spl_Act_values(j))
If comp= 0 Then
flg=flg+1
Exit For
End If
Next
If flg=0 Then
Print (Spl_Exp_Values(i) & " not found in Actual Values list")
End If
Next
End Function
In above function I am comparing two List (i.e :-Exp_vaues,Act_values). Then I would like to print the missed values in second list which is present in first. Now I'm getiing Output like below,
Output:-
Spain not found in Actual Values list
Russia not found in Actual Values list
Mexico not found in Actual Values list
Germany not found in Actual Values list
But I would like to print all the missed values in one statement(E.g:-Spain,Russia,Mexico,Germany not found in Actual values list)
Pls help me to get solution for this.