RAD Studio (Common)
ContentsIndex
PreviousUpNext
E2109: Constant expected (Delphi)

The inline assembler was expecting to find a constant but did not find one.

program Produce;

  procedure Assembly(x : Integer);
  asm
    mov   ax, x MOD 10
  end;

begin
end.

The inline assembler is not capable of performing a MOD operation on a Delphi variable, thus the above code will cause an error.  

Many of the inline assembler expressions require constants to assemble correctly. Change the offending statement to have a assemble-time constant.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!