Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit specifying 'DECLARE VARIABLE' words when declaring variables [CORE3134] #3511

Open
firebird-automations opened this issue Sep 13, 2010 · 2 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Votes: 1

When we create SP or EB like this:
execute block
as
declare variable v_name varchar(50) = '';
declare variable v_age smallint;
declare variable v_count int = 0;
begin
...
end

-- it is quite unnecessarily to specify first two words before each variable, i.e. 'DECLARE VARIABLE'.
I think that there will no any loss of clarity if syntax will allow to write:
execute block
as
v_name varchar(50) = '';
v_age smallint;
v_count int = 0;
begin
...
end

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

summary: Allow not specifying 'DECLARE VARIABLE' words when declaring variables => Omit specifying 'DECLARE VARIABLE' words when declaring variables

@firebird-automations
Copy link
Collaborator Author

Commented by: Ain Valtin (ain)

BTW the "VARIABLE" keyword in the declaration is already optional, one can write

CREATE TRIGGER foo ...
AS
DECLARE bar INTEGER;
BEGIN
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant