quick question - strcmp - and foreach - how it works??

   3586   1   0
User Avatar
Member
28 posts
Joined: July 2009
Offline
hi, i was having a little problem understanding how the function strcmp() works, if anyone could clarify a little bit about this…

the help says:

strcmp(“abc”, “xyz”) = -1

strcmp(“xyz, ”abc“) = 1

strcmp(”abc“, ”abc“) = 0

but it doesnt really clear things, what if the string is: ”zbaxcy“ or ”cbayzx“ or something mixed like that?

so i wonder if someone could give example files of a practical use of this function. because the term ”lexicographicaly" explained in wikipedia is a bit complex.


edit: well due that i see a lot of times this function with foreach sop operations, i wanna ask if you have some examples in of the for each sop too.
User Avatar
Member
28 posts
Joined: July 2009
Offline
forget it, i just found the answer in peter quints videos: http://www.vimeo.com/7361123 [vimeo.com]

but could be nice to see more examples of the for each sop anyway.
  • Quick Links