Subject | Re: [IBO] Code branching incorrectly in procedure TIB_Column.SetAsVariant( const NewValue: Variant ); in IB_Components |
---|---|
Author | Jason Wharton |
Post date | 2009-08-29T00:24:42Z |
> I see you are no longer on skype.I just had to step away from my desk for a while. I left my speakers off so
I didn't hear the notice of your post.
> The problem arises due to an omitted; in the above procedure:Very interesting. This suggests that the PASCAL parsing for D2009 has been
> IB_Components...
> procedure TIB_Column.SetAsVariant( const NewValue: Variant ); ...
>
> Lines: 42610 - 42622 reads as follows:
>
> SQL_BLOB,
> SQL_BLOB_: if AsString <> NewValue then
> begin
> WasChanged := true;
> AsString := NewValue;
> end
> // SQL_ARRAY,
> // SQL_ARRAY_: {should be overridden} ;
> else
> raise EIB_Error.CreateWithSender( Statement,
> Format( E_UNSUPPORTED_COLUMN,
> [ SQLType ]));
> end;
>
> And should read:
>
> SQL_BLOB,
> SQL_BLOB_: if AsString <> NewValue then
> begin
> WasChanged := true;
> AsString := NewValue;
> end;//*****************************************;Added here to branch
> out correctly ******************************
> // SQL_ARRAY,
> // SQL_ARRAY_: {should be overridden} ;
> else
> raise EIB_Error.CreateWithSender( Statement,
> Format( E_UNSUPPORTED_COLUMN,
> [ SQLType ]));
> end;
altered. Seems to me it should have raised an exception of some kind at
compile time rather than outright changing the behavior in a manner this is
non-intuitive.
Now I wonder if I should audit all of my case statements for any other
occurences of this issue.
Thanks for spotting this! It will be fixed in my next release.
Jason Wharton