2016-04-20 8:58 GMT+02:00 leledumbo <[email protected]>:
> At syntax level, there's no Pascal equivalent
> of C's comma (sequence) operator. Argument evaluation in C is strictly
> right
> to left, in Pascal it's up to the compiler. A silly but valid C statement:
>
> printf("%d%d%d\n",i++,++i,++i,i++);
>
> would be hard to convert to Pascal automatically without blowing out the
> compiler.
>
C's comma (sequence) operator is possible to use in Pascal:
function printf(fmt: PAnsiChar): Integer; cdecl; varargs; external
'msvcrt.dll' name 'printf';
begin
printf('%d%d%d'#10,1,2,3,4);
end.
--
Best regards,
Maciej Izak
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal