このコードを 1 時間以上いじって、別の方法で再配置しようとしました。もっと簡単に書く方法はありますか?
if x is not Number ;// if x is string
{
if y is not Number ;// x, y both strings
{
Eval(x)
Eval(y)
return
}
else ;// x is string, y is Number
{
Eval(x)
Scale(y)
return
}
}
else if y is not Number ;// x is Number, y is string
{
Scale(x)
Eval(y)
return
}
else ;// both are numbers
{
Scale(x)
Scale(y)
return
}