Show: Object Pascal C++
Display Preferences

E2118 Division by zero (Object Pascal)

From Appmethod Topics
Jump to: navigation, search

Go Up to Error and Warning Messages (Object Pascal) Index

The inline assembler has encountered an expression which results in a division by zero.


program Produce;

  procedure AssemblerExample;
  asm
    dw  1000 / 0
  end;

begin
end.

If you are using program constants instead of constant literals, this error might not be quite so obvious.


program Solve;

  procedure AssemblerExample;
  asm
    dw  1000 / 10
  end;

begin
end.

The solution, as when programming in high-level languages, is to make sure that you don't divide by zero.

Personal tools
In other languages