Subject Re: [Firebird-Architect] Named arguments for SP
Author Adriano dos Santos Fernandes
Nando Dessena wrote:

>I guess you are assuming implicit datatype coercion/cast between the
>varchar values 'true' and 'false' and the boolean type, which if you
>ask me it's not necessarily a good idea.
>
Yes. But implicit conversions exist for the others datatypes.

>Anyway, the value of x in sp2
>depends on how you impose the syntax and precedence rules.
>I'd say that the construction "param_name = ..." should be
>unambiguously treated as "assigning a named parameter a value". If you
>want to put an expression in there then you should use brackets, as:
>
>execute procedure sp2 ((x = 'false'));
>
>But that's just an arbitrary solution, my point being that there's no
>ambiguity provided you make the rules clear.
>
>
The ambiguity I told already exist with UPDATE for example, and you can
resolve it with :variable.

But also I think Dmitry's syntax break the parser, it's not LALR(1) when
"x = 1" is a valid expression.


Adriano