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

[REBOL] UHURU unit structure

From: agem:crosswinds at: 29-May-2001 1:35

(Was kicked of the list, so escribe-copy)
>-->
From: Joel Neely Date: Mon, 28 May 2001 08:45:50 I propose that the "working code" portion of an UHURU unit *always* have the following structure: REBOL [ ; header data to be discussed later ] make object! [ ; the usual stuff... ; *without any* SET referring to external words ] <--< sounds like something as http://jove.prohosting.com/~screbol/reb/ctx-contexter4.r to me? With some work?
>-->
and that one *always* incorporate an UHURU unit via one of the two following means (layout/whitespace choices optional): my-obj-name: UHURU/make unit-name or my-func-1: my-func-2: my-func-n: none ; or other null value, ; later followed by set [ my-func-1 my-func-2 my-func-3 ] UHURU/import unit-name [ unit-func-1 unit-func-2 unit-func-n ] <--< suggestion: (replace [do %file.r] with [UHURU/make unit-name] if you want) [REBOL [title: {uhuru-import, one line}] save/header %lib-demo-obj.r [ context [ f1: "f1" f2: "f2" ] ] [] obj2: context [ import: func [words src] [set words reduce bind/copy words in src 'self] test-obj: do %lib-demo-obj.r f1: none ;may be automatic using something like contexter import [f1] test-obj ] ? obj2 ]