Subject | Re: [Firebird-Architect] Exec. statement parameters |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2007-12-13T11:53:31Z |
Vlad Khorsun escreveu:
When you use (:=), you are assigning to something in another "layer" (a
calling procedure/function parameter or a named parameter).
(=) is used to compare and assign in the same PSQL module.
named and unnamed parameters is (already?) available... And...
STMT, and the current existing one will not work for EXEC STMT.
Among the voted things, it's the more voted feature.
x = a -- always assignment
expression:
where x = a -- always expression
x = a = b -- a = b should always be expression with boolean
datatype
One main purpose of this list is to not create features that causes
future ones to not be possible.
I see no problem in staged implementations (first named params. for
EXEC. and latter for DSQL).
But please do not think at current existing features only.
Look at other implementations too. VBA uses different operator (:= and
=). Oracle too (=> and :=).
Adriano
> I.e. this is assignment operator. Is it consistent to have one assignment operator (:=)It's inconsistent to use (=) here, as the purposes is different.
> for one purpose, and another (=) from another purposes ? I don't think so
>
When you use (:=), you are assigning to something in another "layer" (a
calling procedure/function parameter or a named parameter).
(=) is used to compare and assign in the same PSQL module.
>It seems you're not planning this feature good enough. You first said it
>>> Yes. But how it related to the our question ? Also i suggest not allow to mix named and unnamed
>>> parameters at one query.
>>>
>>>
>> And it's not good to have different syntax regarding named/unnamed
>> parameter is used inside the exec. stmt. string.
>>
>
> EXEC STMT will use named parameters only. At least at first implementation.
named and unnamed parameters is (already?) available... And...
> And this named parameters wouldn't been implemented at DSQL level. As we allow to call EXEC STMT from... are creating a different parameter mechanism that work only for EXEC
> PSQL only i see no problem with compatibility in future.
>
STMT, and the current existing one will not work for EXEC STMT.
> Please, don't make generic statements, show examples when possible. Else we neverExamples of ambiguous expressions has already posted.
> understand each other.
>
>> How many features has more votes than it? It was one of the more votedIf the voting system is not representative is another problem.
>> things when I looked.
>>
>
> Again, 10 votes is equal to no votes at all. My opinion of course. Currently i didn't consider
> voting system as working\representative.
>
Among the voted things, it's the more voted feature.
>statement:
>>>> That means one could have a function parameter or a variable using
>>>> boolean type.
>>>>
>>>> And result of "something = otherthing" should be a valid expression
>>>> (value) returning TRUE/FALSE/NULL.
>>>>
>>>>
>>> "C" language have the same issue and worked fine with it, isn't is ? Unfortunately in this
>>> aspect our PSQL more like "C" than "PASCAL". And i don't think mix of two languages is
>>> ok for us. Also imagine following code :
>>>
>>> DECLARE X BOOLEAN;
>>> DECLARE A INT;
>>> DECLARE B INT;
>>>
>>> X = A = B;
>>>
>>> You see - there we have same ambiguity. So introducing ":=" (or @ mark) for parameters
>>> is not a solution for "BOOLEAN data type issue".
>>>
>> The is no ambiguity in "X = A = B" for our language. We accept l-values
>> only at statement level (and not inside expressions) and we don't accept
>> expressions at statement level.
>>
>
> Not sure i understand what you mean above ;)
>
x = a -- always assignment
expression:
where x = a -- always expression
x = a = b -- a = b should always be expression with boolean
datatype
>As long you not introduce it in the main branches, I see no problem.
> Anyway, i need to move forward. I'll implement following syntax for input parameters of EXEC STMT :
>
> param_name = expression [, param_name = expression]
>
> If we'll decide to change syntax it wouldn't been too hard as only parser would need to be changed
>
One main purpose of this list is to not create features that causes
future ones to not be possible.
I see no problem in staged implementations (first named params. for
EXEC. and latter for DSQL).
But please do not think at current existing features only.
Look at other implementations too. VBA uses different operator (:= and
=). Oracle too (=> and :=).
Adriano