[erlang-questions] Reading, Learning, Confused

doug mansell doug.mansell@REDACTED
Sun Jul 20 21:12:46 CEST 2008


oops, premature email send.

On Sun, Jul 20, 2008 at 9:10 PM, doug mansell <doug.mansell@REDACTED> wrote:
> On Sun, Jul 20, 2008 at 8:52 PM, Alpár Jüttner <alpar@REDACTED> wrote:
>> On Sun, 2008-07-20 at 14:53 -0300, Toby Thain wrote:
>>> (Compare, e.g. C's | and ||, where | may be used deliberately for
>>> side-effects on the RHS.)
>>
>> It is a different story. In C, '|' is the bitwise or operation, it
>> corresponds to 'bor' in Erlang. ('||' in C is the same as 'orelse' and
>> there is no C equivalent for the 'or' operator of Erlang.)
>
> sure there is:
>
> erlang_style_or(bool A, bool B)

bool erlang_style_or(bool A, bool B)
{
  return A || B;
}

... but this is getting off topic.  :)



More information about the erlang-questions mailing list