Hi all,

can anyone help me with this simple question about contexts

Consider the following rebol program

REBOL [
    Title: "Test function definition"
    Date: 04-Jun-2000
    File: %fx.r
    Purpose: "Test function definition"
]

; define fx
fx: function [x] []
[
    print x
    print do text-fx
]

; Main line
text-fx: "x * x"

x: 100

fx 2
fx 3


even though I have passed the variable x into the function fx, when I "do"
the string text-fx it used the value of x from the main line.

How do I get the do function to take the value of x passed into the
function.
(I'm sure someone has told me how to this previously but I cant remember the
answer :-(( .... )

Cheers PHil

Reply via email to