View Single Post
Old 05-09-2014, 06:25 PM   #18
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Jellby View Post
If the comparison is "val < cmpN", the example:

first_matching_cmp(10, 5, "small", 10, "middle", 15, "large", "giant")

should return "large", not "middle", since 10 < 10 is not true.

(EDIT: what the...? Why does "large" appear as "la rge" in my post? I even typed the whole line, so no weird characters there)
Here, I fixed it for you.

The forum software has a weird problem it seems, where a single line of text that is too long without spaces will get randomly broken in the middle. You could also put it in as code, which kinda fits here.

Code:
first_matching_cmp(10,5,"small",10,"middle",15,"large","giant")
eschwartz is offline   Reply With Quote