... or you search for
int main(int argn, char **argc) (I was looking for source code snippets that do not use the typical int argc, char **argv names) the
google code search behaves rather strangely.
The first result you get is:
this is not too surprising as the google code search features regexes and * is a reserved symbol in POSIX extended regular expressions but at least the recommendation of
int argn, char "main(int" "**argc)" is a bit surprising.
Searching for this actually results in a function that matches the string you wanted to search for originally. So far so good, I didn't look into the codesearch syntax in detail, so this might make sense.
The result looks like:
i
Note that the result has 9 pages (the screenshot is missing this detail) but also only 9 results. The first question that arises is: Why do they only display one result on the page instead of n (usually they do display more)?
Looking at the other pages it becomes confusing. On page 2 this looks like:
Now where have pages 4-9 been gone? Ok, to be fair, google sometimes strips additional search results if the content is too similar, this is not too surprising.
But then, visiting page 3 you get:
Tada, pages are there again!
At this point I am/was totally confused and am really wondering what the idea behind this behaviour is.
If someone is using the google codesearch more frequently (or even is a google employer) please enlighten me!