View Single Post
Old 12-30-2015, 11:14 PM   #21
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)
The switch function accepts a final fallback value -- should be empty.
Use ifempty() to skip the first switch statement if it is empty -- or first_non_empty() for more than two switches.

No need for recursive test()'s.
The final '' is redundant logic -- you should be relying on the spot reserved by generic_flag.png
Speaking of which those are mutually conflicting goals.

Last edited by eschwartz; 12-30-2015 at 11:19 PM.
eschwartz is offline   Reply With Quote