Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Object private member (was: objects: overhead, private data, naming

From: dockimbel:free at: 20-Sep-2001 15:20

Hi Christophe, CRS - Psy Sel/SPO, COUSSEMENT, Christophe, CPN wrote:
> Hi REBOLians: > > About object private members, could anybody explain this to me: > > <code> > o: context [ > _a: 5 > set '_b 10 > get-a: does [print-a] > set 'print-a does [print _a] > set 'get-b does [print _b] > ] > </code>
[...]
> So... it looks like within an object, the use of 'set invoque a > privatization of the word, which is not any more visible from the outside.
No, you've defined '_b and 'get-b in the global context ! That's why o/_b and o/get-b return an error.
>>_b
== 10
>>get-b
10 Regards, DocKimbel.