-
Notifications
You must be signed in to change notification settings - Fork 7
Context
btiffin edited this page Dec 22, 2011
·
2 revisions
context block
Define a unique, underived context.
context is a function!
block -- Context variables and values. [block!]
throw
w> c: context [a: 1 c: [print a + a]]
w> type? c
== context!
w> help c
c is a context! of value:
a integer! 1
c block! length: 4
w> c/a
== 1
w> c/c
== [print a + a]
w> do c/c
2
The context c includes two named items, a and c. Accessed by name from the top level as c/a and c/c.
w> a
** Script error: a has no value
** Near: a
a is defined inside the context c, and in this example, is not exposed to the top level.