semantic: Handle foreach integer by looping.