E2186 Published Real property '%s' must be Single, Real, Double or Extended (Object Pascal)

From Appmethod Topics
Jump to: navigation, search

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

You have attempted to publish a property of type Real, which is not allowed. Published floating point properties must be Single, Double, or Extended.


program Produce;
  type
    Base = class
      R : Real48;
    published
      property RVal : Real read R write R;
    end;
end.

The published Real48 property in the program above must be either removed, moved to an unpublished section or changed into an acceptable type.


program Produce;
  type
    Base = class
      R : Single;
    published
      property RVal : Single read R write R;
    end;
end.

This solution changed the property into a real type that will actually produce run-time type information.