我一直在编写使用函数调用的代码,这些函数调用非常长并且通常超过80个字符.通常我会像这样拆分这些函数调用:
LongFunctionName(first_argument,
another_argument,
finally_last_argument);
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试将它放入if语句时,它看起来很奇怪,主要是因为它变得不太清楚它与之比较的值是什么:
if(LongFunctionName(first_argument,
another_argument,
finally_last_argument) != value_compared_to)
{
// stuff to be called
}
Run Code Online (Sandbox Code Playgroud)
您如何将此语句格式化为更易读并且适合80个字符?