From: Howard T. <how...@di...> - 2007-08-09 14:59:19
|
Hi Wolfgang and Eric, According to ETL, the '$' operator applied to a non-constant feature should provide its POINTER address, such that when the pointer is passed to an external routine, that routine can modify the feature, probably returning a previously supplied value. Unfortunately, EiffelStudio (I think) does not follow ETL and uses, for a reference feature, the '$' operator as an equivalent of SmartEiffel's to_external concept to return the POINTER equivalent of the address of the referred-to object, which is what Eric has implemented to be compatible with ES -- which in my opionion is a pain for both implementations. Eric will no doubt expound on it. Just my .0.2c ... Howard On Thursday 09 August 2007 15:40, Wolfgang Jansen wrote: > Hi Eric, > > lets consider the program splitter > > p1 := $ref_attr > p2 := $int_attr > > where `p1',`p2' are POINTERS, `ref_attr' is > an attribute of a reference type, > and `int_attr' is an INTEGER attribute. > > The effect is that `p2' is set with the address > of `int_attr' within `Current'. But `p1' is not > set with the address of `ref_attr', instead `p1' > is set with the value of `ref_attr' itself. > > Is this a bug, or did I misunderstand the > definition of the `$' operator ? > > WJ -- Howard Thomson -- "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -- Albert Einstein |