bless
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | bless [2006/07/25 21:22] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Synopsis: | ||
+ | [[bless]] | ||
+ | |||
+ | ======Technical: | ||
+ | Ordinarily, the local variables of an [[atomic scope]] are only visible to that | ||
+ | atomic scope, and cannot be used outside. | ||
+ | access an atomic scope' | ||
+ | atomic scopes can cooperate at runtime to accomplish this if the enclosing | ||
+ | scope does [[wait]] and the enclosed scope does [[bless]]. | ||
+ | |||
+ | Each [[bless]] attaches itsself to the oldest unmatched [[wait]]. | ||
+ | have [[wait]]s pending, and then do a [[wait]]+[[bless]] combo, the results | ||
+ | may be disasterous, | ||
+ | |||
+ | Presently [[bless]] ignores its arguments, but this will not always be the | ||
+ | case, so you should not supply any arguments for forwards compatability. | ||
+ | |||
+ | ======Example: | ||
+ | This is best demonstrated with an example: | ||
+ | |||
+ | alias uh | ||
+ | { | ||
+ | ^local blahblah | ||
+ | wait for { | ||
+ | ^userhost $* -cmd { | ||
+ | bless | ||
+ | push blahblah $3@$4 | ||
+ | } | ||
+ | } | ||
+ | return $blahblah | ||
+ | } | ||
+ | |||
+ | To share variables between aliases, use the " | ||
+ | |||
+ | alias one { | ||
+ | bless | ||
+ | @ :hi = 'this is a test' | ||
+ | } | ||
+ | alias two { | ||
+ | @ :hi = 'this is the first value' | ||
+ | one | ||
+ | echo $hi | ||
+ | wait for { one } | ||
+ | echo $hi | ||
+ | } | ||
+ | |||
+ | This outputs 'this is the first value' and 'this is a test' | ||
+ | case, the [[bless]] has no effect because nobody is [[wait]]ing for it. In | ||
+ | the second case, alias one can change the local variable in alias two because | ||
+ | alias two is [[wait]]ing for it. | ||
+ | |||
+ | ======History====== | ||
+ | The [[bless]] command first appeared in EPIC4pre0.009. | ||
+ | |||
+ | #$EPIC: bless.txt,v 1.3 2006/07/17 20:11:14 sthalik Exp $ | ||
bless.txt · Last modified: 2006/07/25 21:22 by 127.0.0.1