On Fri, 5 Feb 2016, Lukasz Sokol wrote:

On 05/02/16 09:23, Michael Van Canneyt wrote:


On Fri, 5 Feb 2016, Lukasz Sokol wrote:

But introducing 2 new operators based on words (a-z, not 16 bit) means 2 new 
keywords and causes conflicts.
Except if "then" and "else" are used (but without "if")
x := 1 < 3 then 5 else 4;

No. Think about the ambiguities that arise if you use this inside the condition 
of an if-statement.

What if it required use of braces:

x := (expression then truevalue else falsevalue);

Let's make it simple:

The use of "if", "then" and "else" are not up for discussion.

Ah ok.

so I think no /current/ keywords would be allowed either... I see.

Anything that spells 'statement' is indeed going to meet with fierce resistance.


What of

x := ( condition, true:=truevalue, false:=falsevalue);

Apart from any parsing difficulties this may present, what is the benefit over

  x:=condition ? truevalue : falsevalue

The latter being the generally used one ?

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

Reply via email to