0

|| の意味は何ですか? 2つの関数呼び出しの間

{
//some code 
return Find(n.left,req)||Find(n.right,req);
}

http://www.careercup.com/question?id=7560692

誰かが私を理解するのを助けることができますか. よろしくお願いします。

4

3 に答える 3

1

これは、2 つの関数のいずれか (または両方) が true の場合に true を返すことを意味します。

プログラミング言語に応じて、メソッドは Find(n.left,req) を呼び出します -> true の場合 - true を返します。false の場合は、Find(n.right,req) を呼び出し、ブール値を返します。

于 2013-02-11T08:03:43.830 に答える
0
 return Find(n.left,req)||Find(n.right,req); 

最初に find {Find(n.left,req)}を実行し、true を返す場合は true を返すことを意味します。

execute second find は、true を返す場合は値 true を返し、それ以外の場合は false を返します。

于 2013-02-11T08:16:48.143 に答える