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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looping thro an Array...

Status
Not open for further replies.

cwalshe

Programmer
May 28, 2001
84
IE
Hi there,

I have an array populated with various data. I'd like to check each entry in the array for a condition, say does it end in an 's'. If it dose then do something, if not do something else. The testing for teh condition is not too important but I am wondering how do I take each entry from the array and test them.

Thx,

Cormac.
 
well you could simply loo through using an integer fo rht index value like

for i = 0 to ubound(arrayname)

if right(1,arrayname(i)) = "s" then
....
else
...
end if

next i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top