[fpc-pascal] About undocumented features
dmitry boyarintsev
skalogryz.lists at gmail.com
Wed Jun 10 07:40:30 CEST 2009
> I just read the recent documentation and found some undocumented features,
> such as slice, strict, and dispinterface. Can anyone explain what they are?
> And are there any more than these 3?
AFAIK, "slice" is delphi comatibility function. Here's the
description: http://delphi.about.com/library/rtl/blrtlSlice.htm
"dispinterface", it also delphi compatiblity reserved name to define a
dispatch-interface used with Windows COM.
"slice" and "dispinterface" have been there long time ago.
"strict" is introduced for new delphi compatibility?
http://delphi.about.com/od/delphifornet/a/aa022404a_2.htm
[quote]
any member of a class (variable, method, property, ...) has a
visibility attribute. In addition to "standard" Delphi visibility
specifiers, Delphi for .Net adds two new access specifiers. Again,
when you start a new FCL Windows Forms application, and look in the
code that defines the main Form, you'll see two new "groups": strict
private and strict protected.
A member of a class declared with the strict private visibility is
accessible only within the class in which it is declared - not visible
to procedures or functions declared within the same unit.
A member of a class declared with the strict protected visibility is
accessible within the class in which it is declared, and within any
descendant class.
Here's an example:
~~~~~~~~~~~~~~~~~~~~~~~~~
type
TWinForm = class(System.Windows.Forms.Form)
strict private
Components: System.ComponentModel.Container;
DataGrid1: System.Windows.Forms.DataGrid;
procedure InitializeComponent;
procedure TWinForm_Load(sender: System.Object; e: System.EventArgs) ;
strict protected
procedure Dispose(Disposing: Boolean) ; override;
public
constructor Create;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
[/quote]
thanks,
dmitry
More information about the fpc-pascal
mailing list