Are parentheses around the result significant in a return statement?

前端 未结 11 2347
感情败类
感情败类 2020-11-27 12:07

Is there a difference between these two statements inside a function?

bool returnValue = true;
// Code that does something
return(returnValue);
11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 12:40

    Nope there's no difference between the two, although you can include parenthesis if it makes the expression easy to read and clear.

提交回复
热议问题