each step follows from the preceding step, and the code stops as soon as it
knows the answer. It tells a simple story:
If you want to find an element of tab->item with name==arg,
- First check that tab points to something.
- Then check each element of the pointed-to array, returning if you find a match.
- If you didn't find it, it's not there.
The old version of the story is extremely roundabout:
If you want to find an element of tab->item with name==arg,
- First, assume its not there.
- Then check that tab points somewhere. If so
- go through the array until you see what you're after.
- When you're done looking, you found a match if and
only if you didn't go through the whole array.
- go through the array until you see what you're after.
- Having done all that, inform the caller about what you determined.
” source...
Loading...