4 ms·
Although I'm not who you asked, I can think of a slightly contrived example. If a is a variable name, then this is using b as the first argument to call the fun
by trealira 3y ago
Although I'm not who you asked, I can think of a slightly contrived example. If a is a variable name, then this is using b as the first argument to call the function a (which is surrounded by unnecessary parentheses). If it's a type name, it's casting b to the type a.
result = (a)(b);
- WalterBright 3y agoIt's not contrived enough - it happens in real C code.
- trealira 3y agoMy example is slightly contrived because the parentheses around b are unnecessary to cast it, but it becomes more realistic if it's a more complex expression like this: (foo)(a + b) Or this: // Comma expression or function call arguments? (bar)(first = side_effect++, second)
- WalterBright 3y agoYeah, (a)(b,c) is that a comma-expression or an argument list?