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

[REBOL] Re: Need help on something tricky...

From: tim:johnsons-web at: 3-Oct-2001 20:48

On Wed, Oct 03, 2001 at 10:50:27PM -0400, Christian Morency wrote:
> Hi, > > I'm currently working on a rebol library that implements many useful > features to Rebol, but I have hit a nail I guess... so here's the nail... > and please I know the question, example may sound absurd but I would like to > implement this because developers using this script don't have to know what > it does actually... I only want to make the use of this script easier. > > let's say I have a function that bind a word to a value : > > bind-word-to: func [word value] [ > do reduce [ > to-set-word word rejoin [ > value " of " to-string word > ] > ] > ] > > I would use it like this : > > >> bind-word-to 'my-string "this is the value" > == "this is the value of my-string" > >> my-string > == "this is the value of my-string" > > Now how could I use it this way instead ?
This isn't the best answer, but think about this until someone else reads this.... (my wife is telling me to get my butt away from the computer) f: func[arg[word!]][print rejoin["the value of " arg " is " get arg]
>> f 't
the value of t is 4
> my-string: bind-word-to "this is the value" > > I know the question or example may seem stupid, but it is 1) something I > don't know how to do, 2) something very useful in what I'm trying to attain, > ie user/developer simplicity for my library > > Best, > Chris > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.johnsons-web.com