阅读背景:

数组作为交换机语句的选项

来源:互联网 

I remember from way back at university using a switch with 'binary search' or 'binary switch'. Something like that, My google foo is broken today. Anyway it goes down like this: You define an array of possible options (Strings usually), some magic happens, and those options in the array become the cases in the switch happens. I do remember that they had to be in alphabetical order for this to work. Can you help me remember the magic? Even a name of what I should be looking at would be fantastic.I remember from way back at university using a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: