Delphi Error – E2114 String constant too long

Delphi Compiler Error

E2114 String constant too long

Reason for the Error & Solution

The inline assembler has not found the end of the string that you specified. The most likely cause is a misplaced closing quote.

program Produce;

  procedure AssemblerExample;
  asm
    db 'Hello world.  I am an inline assembler statement
  end;

begin
end.

The inline assembler is unable to find the end of the string, before the end of the line, so it reports that the string is too long.

program Solve;

  procedure AssemblerExample;
  asm
    db 'Hello world.  I am an inline assembler statement'
  end;

begin
end.

Adding the closing quote will vanquish this error.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...