Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not able to compare string value correctly from an array

Status
Not open for further replies.

programmer1982

Programmer
Jun 9, 2015
1
US
Hello,

{
Data_list = some data1;
Data_list2 = some data2;
}
END
{
while (read some file) {
Data_list1 = Some data3;
}
for (patchNo in Data_list1) {
----
----
----
if (!(x in Data_list2)) {bCheck = 0; break;}
if (!(patchNo in Data_list)) { bCheck = 0; break;} ----> this line is not able to match patchno in Data_list (*1)
}
}
(*1)
While print the values of array Data_list it is found that some values of patchNo are exists in the Data_list; but in the line if (!(patchNo in Data_list)) this condition is not getting true even once for even the existing values.
Please suggest how to resolve this problem.

Thank You
 
If you want to receive any help, you will need to:
[ul]
[li]Write a clear explanation of the problem in proper English, with proper grammar and punctuation.[/li]
[li]Do not post in all capitals or use IM-speak like "U", "Ur", "U r", "Plz", "prb", "qry" or any acronym that is not well-known by the community.[/li]
[li]Include all relevant information such as OS name & version[/li]
[li]Post FORMATTED (using code tags) and properly INDENTED code[/li]
[li]Post test data to reproduce problem test case.[/li]
[li]Provide your expected result set and explain the rules/reasons that lead to it.[/li]
[/ul]
[banghead]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top