items = {"apple", "banana", "cherry", "date"}
targetItem = "cherry"
found = false
index = 1
_While not found and index <= #items do
_If items[index] == targetItem _Then
found = true
_Else
index = index + 1
_End_If
_End_While
_If found _Then
_Print_Console("Item found at index: " .. index)
_Else
_Print_Console("Item not found")
_End_If