The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,777 other followers

Archive for October 6th, 2011

When you are bitten by normally having the luxury of a current development environment

Posted by jpluimers on 2011/10/06

Sometimes you are at clients that don’t fully appreciate the luxury of keeping their development environment current.

This case a client still using Delphi 2006, where I promptly ran into a compiler error that was solved 5 years ago: a “F2084 Internal Error: C11919” at the end of the method.

begin
  if RMQResult.Create(CompCode, Reason).IsOK then
//...
end; // [Pascal Fatal Error] MQObjects.pas(668): F2084 Internal Error: C11919

The cause is that the compiler barfs at calling a method on a freshly created record.
The function result is an intermediate, which is not handled correctly (fixed in Delphi 2007).

This is not only for record intermediates: reusing an intermediate like the result of Pred() will crash the compiler in Delphi 2006.

The workaround is introducing a real variable.
This works:

var
  MQResult: RMQResult;
begin
  MQResult := RMQResult.Create(CompCode, Reason);
  if MQResult.IsOK then
//...
end; // compiles fine

–jeroen

Posted in Delphi, Development, F2084, Software Development | 4 Comments »

 
%d bloggers like this: