REBOL3 tracker
  0.9.11 beta
Ticket #0001630 User: anonymous

Project:

Previous Next
TypeWish Statusreviewed Date1-Jul-2010 13:14
Versionalpha 99 CategoryMezzanine Submitted byBrianH
PlatformAll Severitytrivial Prioritynormal

Summary INTERN of an any-word!
Description INTERN can work on a block of words, and that is all LOAD need it to do. But other people might want to INTERN a single word. This is a trivial fix, the source of which is below.
Example code
intern: funct [
	"Import new values into the user context (bind and resolve them)."
	data [block! any-word!] "Block or word to be added (deeply)"
][
	new: 1 + length? system/contexts/user ; old context size
	; Extend the user context with new words
	data: bind/new :data system/contexts/user
	; Copy only the new values into the user context
	resolve/only system/contexts/user system/contexts/system new
	resolve/only system/contexts/user system/contexts/exports new
	:data
]

Assigned ton/a Fixed in- Last Update1-Jul-2010 13:15


Comments

Date User Field Action Change
1-Jul-2010 13:15 BrianH Code Modified -
1-Jul-2010 13:15 BrianH Status Modified submitted => reviewed
1-Jul-2010 13:14 BrianH Ticket Added -