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

[REBOL] Re: basics: meaning and uses of make object! vs. context

From: ingo:2b1 at: 11-Jun-2002 0:25

Hi Jason, Ammon, Ammon Johnson wrote:
> Hi again, > > Yes, there are times when the SOURCE hides things from you... > >>>source make >> > make: native [ > "Constructs and returns a new value." > type [any-type!] "The datatype or example value." > spec [any-type!] "The attributes of the new value." > ] > > You see MAKE is a Native! It isn't done in REBOL code, but rather in the > language REBOL is written in (C?) so SOURCE couldn't tell you if it wanted > to. Other than that, SOURCE will hide nothing from you. Use the SOURCE, > Luke! The SOURCE will not fail you... ;-)
Unless it does, of course ...
>> a: make object! [ blk: [ print "HI" ] set 'f func [][ do blk ]] >> f
>> source f
f: func [][do blk]
>> blk
** Script Error: blk has no value ** Near: blk This is an artificial example, of course, but it is not that uncommon that critical parts of a function are hidden in an object!. Especially once you start with /View. That said, 'source is always worth a try. Kind regards, Ingo