Hi Pinku,
Try this,
"USING: kernel ; 1 1 + drop ;" eval>string print
It outputs
"""
1: USING: kernel ; 1 1 + drop ;
^
No word named ``+'' found in current vocabulary search path
The following restarts are available:
:1 Use the math vocabulary
:2 Defer word in current vocabulary
Type :help for debugging help.
"""
There's no way to change the default vocabularies for eval.
Slava
On Fri, Oct 16, 2009 at 10:03 AM, Pinku Surana <[email protected]> wrote:
> Hi,
> I'd like to evaluate a string at runtime within an environment that uses
> additional vocabularies. The two words I found in the docs are eval( and
> eval>string. I guess both use some default vocabulary, but how can I add
> more without hacking the input string? Even better would be a way to
> construct an environment that has pre-loaded a set of vocabularies and
> denied permission to another set of vocabularies. For example, I'd like to
> disallow people from using anything in the io namespace.
> Also, I can't even make eval>string work. What's wrong with this?
> ( scratchpad ) "USING: kernel ; 1 1 + drop ;" eval>string
> :deprecations - show 6 deprecated word usages
> --- Data stack:
> "1: USING: kernel ; 1 1 + drop ;\n ^\nNo ..."
> ( scratchpad )
>
> Thanks,
> Pinku
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk