Subject Re: [Firebird-Architect] Exec. statement parameters
Author Adriano dos Santos Fernandes
Vlad,

We do not have parameters in EXEC. STMT, boolean datatype, named
parameters for SPs and named parameters in DSQL.

So here examples with my preferred syntax for boolean datatype,
parameters in EXEC. STMT and named parameters for SPs.
I didn't even put examples of DSQL named parameters.

Please try to reproduce this code with your syntax. You will see how
ambiguous and confusion it is (will be, when all constructions are
available).

-------------
-- procedure p(i boolean);

-- should be valid
execute block (
i integer
) returns (
o boolean
)
as
begin
select a = c from t where a = :i into :o;
execute procedure p(i = 1);
end;

-- should be valid
execute block (
i integer
) returns (
o boolean
)
as
begin
execute statement 'select a = c from t where a = ?' (i) into :o;
end;

-- should be valid
execute block (
i integer
) returns (
o boolean
)
as
begin
execute statement 'select a = c from t where ? is true' (i = 1) into :o;
end;

-- should be valid
execute block (
i integer
) returns (
o boolean
)
as
begin
execute statement 'select a = c from t where a = :i' (i := i) into :o;
execute procedure p(i := i = 1);
end;

-- should be valid
execute block (
i integer
) returns (
o boolean
)
as
begin
execute statement 'select a = c from t where :i is true' (i = 1)
into :o;
end;
-------------


Adriano

PS: I don't know exactly how Borland implemented boolean type in IB.
I've only heard it's ugly.