Subject Re: [Firebird-Architect] Named arguments for SP
Author Nando Dessena
Adriano,
sorry for the delay.

A> What will be the value of 'x' in sp2, 'true' or 'false'?

A> create procedure sp2 (x varchar(5))
A> as
A> begin
A> end;

A> create procedure sp21
A> as
A> declare variable x varchar(5);
A> begin
A> x = 'false';
A> execute procedure sp2 (x = 'false');
A> end;

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. 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.

Ciao
--
Nando Dessena
http://www.flamerobin.org