In accordance with the Fore language specification, the Default directive can be used only for indexed properties.
Delete the directive from the property description or add at least one parameter into the property description.
Class TestClass: Object
i: Integer;
Public Property Value: Integer
Get
Begin
Return i;
End Get
Set
Begin
i := Value;
End Set
End Property Value; Default;
End Class TestClass;
When the specified code is compiled, the following error is displayed: Invalid default directive for non-indexed property. To resolve the error, delete the default directive from the description or add a parameter or parameters to the description of the Value property.
See also: