A warning would be enough.
If after the INTO clause there are 2 or 3 variables, no problem, it will be
very easy to detect the mistake. But sometimes that is not the case because
there are 20+ variables and if variable 3 is called "lcName" and variable
24 is called "lcName" too, the programmer
Doug,
> Delphi's latest compiler provides a hint in these cases:
>
> var
> x: Int32;
> begin
> try
> x := 0;
> x := 1;
> writeln(x);
> end.
>
> [dcc32 Hint] Project1.dpr(14): H2077 Value assigned to 'x' never used
> (Line 14 is the one assigning zero.)
In hindsight my post
Some times,
I need to create a query where there is a 'where (0=0)' .
it´s not logic for anyone.
But to me, it´s significant because I need to certify that WHERE clausule
always exists when populate my query with dinamic filters controlled by my
application.
In your example, I can espaculate that
Interesting. (I haven't used Delphi for decades, certainly not this
century.)
On 09/02/2017 13:17, DougC d...@moosemail.net [firebird-support] wrote:
Delphi's latest compiler provides a hint in these cases:
var
x: Int32;
begin
try
x := 0;
x := 1;
writeln(x);
end.
[dcc32 Hint]
Delphi's latest compiler provides a hint in these cases:
var
x: Int32;
begin
try
x := 0;
x := 1;
writeln(x);
end.
[dcc32 Hint] Project1.dpr(14): H2077 Value assigned to 'x' never used
(Line 14 is the one assigning zero.)
On Thu, 09 Feb 2017 04:30:06 -0500 Tim
Hmm - Delphi and Free Pascal do exactly that - they emit a warning, that
the first assigned value never gets used.
Am 09.02.2017 um 10:30 schrieb Tim Ward t...@telensa.com [firebird-support]:
>
>
> It' the equivalent in a conventional programming language of saying:
>
> x = a;
> x = b;
>
>
It' the equivalent in a conventional programming language of saying:
x = a;
x = b;
where the compiler is expected to know that neither a not the first
assignment have any side effects other than the assignment (and where
the expression b doesn't depend on the value of x)(and where x isn't
The error is of the programmer, I agree with you, but to repeat the name of
a variable without the Firebird showing any message of error is, at least
for me, a bug.
To have 2 or more variables with the same name after the INTO clause is
useless. The compiler can be smart enough to detect such
> Yes, but I can not know the value of the column X.ALU_NOMBRE
>
> And the idea, of course, is know that value, that's why it appears in the FOR
> SELECT. If not, I can do nothing with X.ALU_NOMBRE
You are asking for the system to evaluate the *intent* of logic.
That is completely outside the
Yes, but I can not know the value of the column X.ALU_NOMBRE
And the idea, of course, is know that value, that's why it appears in the
FOR SELECT. If not, I can do nothing with X.ALU_NOMBRE
Greetings.
Walter.
On Wed, Feb 8, 2017 at 12:02 PM, Dimitry Sibiryakov s...@ibphoenix.com
On Thu, 08 Dec 2011 13:53:43 -, firebirdsql firebird...@yahoo.com
wrote:
I have a table with a timestamp column in Firebird 2.5. The format for
timestamps in Firebird is dd-MM- hh:mm:ss:f (microseconds).
However, when the .net data provider is returning the column data, it
11 matches
Mail list logo