Re: Hi a strange code ....



dhaval.bhanu@xxxxxxxxx writes:

if(i,j,k)

This is the "comma operator". The comma operator evaluates its
left-hand operand, then its right-hand operand. Its result is
the value of the right-hand operand. It is most often used in
the expressions in a "for" statement.

If the left-hand operand to a comma operator has no side effect,
as here, then there's no point to doing it at all. When I was
new to the C language, this first surprised me when I was trying
to access a multidimensional array element: a[1,2] is quite
different from a[1][2].
--
"IMO, Perl is an excellent language to break your teeth on"
--Micah Cowan
.



Relevant Pages

  • Re: priority of operators
    ... In the binary operation, +, the left-hand operand appears to be fully ... evaluated before any part of the right-hand operand is evaluated. ... Prev by Date: ...
    (comp.lang.java.help)
  • Re: Determining if one type inherits from another type
    ... "is" will only work for an instance (left-hand operand) and a type (right-hand operand), so it depends on the full scenario. ... my interpretation of the problem might be incorrect... ...
    (microsoft.public.dotnet.languages.csharp)