StoopKid8978
Member
I was wondering about iterations in lists. I read that "for each" is better than "for i", but I can't seem to grasp it completely. I a, specifically looking for a way to go through a list and get an item that is the first item on the list that is greater than a given value.. For example...
Or maybe it would be better to get the ceil that's less than x?
I am hoping this is explained well enough. I want it to ultimately subtract 10 from 12 and give the remainder maybe using mod
example:
Dim x as int = 12
Dim mylist As List
mylist.Initialize
mylist.AddAll(Array As Int(5, 10, 15, 20, 25))
if x > mylist.get(i) then
"stop iterating and return that first value"
I am hoping this is explained well enough. I want it to ultimately subtract 10 from 12 and give the remainder maybe using mod
Last edited: