[fpc-devel] Strange behaviour of ;
Alexander Todorov
alexx.todorov at gmail.com
Thu Oct 20 22:30:02 CEST 2005
Hi all,
i have noticed something strange and I am not sure if this is a bug or
a feature.
------------------------
strSQL := Copy(strSQL,1,Length(strSQL)-1) + ' WHERE ';
strSQL := strSQL ; + ConstructWhereClause;
--------------------------^
This part of code must construct a sql sttement which is used later on.
the function ConstructWhereClause constructs everything that is behind `WHERE`.
How ever having a semi-colon not in right place messed things up.
The result is the old value of strSQL without the result of
ConstructWhereClause.
Removing ; before the plus (+) character fixes the problem.
In Delphi this would cause a compilation error, but in FPC it does not. Why ?
Btw : the miss placed ; appeared because Lazarus' identifier
completion adds a ; when the completion is selected. Any comments on
this ?
More information about the fpc-devel
mailing list