On 2011-08-16 01:48, bearophile wrote:
In Delphi Prism there is the colon operator too:
http://prismwiki.codegear.com/en/Colon_Operator
A quote from another page:
instead of using "." to access members and get a NullReferenceException if they are nil,
use ":" and the call will be skipped for nil (and the result will be nil itself). For
example:
// only call dispose if the interface is implemented.
IDisposable(SomeObject):Dispose;
// access the 3rd parent of a control, where any level might be nil.
x := Button:Parent:Parent:Parent;
Bye,
bearophile
That's a nice feature, several other languages has the same feature as well.
--
/Jacob Carlborg