if(a == 1)func1()else if(a == 2) func2()else if (a == 3) func3()...请问有类似这种情况的时候、如何更简单的匹配函数呢。
收起
a==1?func1():a == 2?func2():a == 3?func3()
报告相同问题?