On 01/02/2016 10:28, Sven Barth wrote:
I have to admit though that I forgot about the potential problems due to refactoring. I'll change the name to avoid this pitfall, though I've yet to decide which one.

well (playing devils advocate), why not IF(a<b, 1, 2).

Only it will have to be written as &IF()

That already works today. The below compiles with fpc 3.0. (And I would guess, few (if any) are using this)

function &if(a: boolean; c,b: integer): integer;
begin
end;

var
  x: Integer;
begin
x := &if(1<2,2,3);
end.




_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to