On Sat, Nov 29, 2008 at 5:30 PM, Jose A. Ortega Ruiz <[EMAIL PROTECTED]> wrote:
>> : in-stack V{ } ;
>>
>> : save-in in get in-stack push ;
>>
>> : restore-in in-stack pop in set ;
>>
>> But it sounds like you don't need something even that elaborate.
>
> Well, since i'm starting to write some factor support code anyway, i can
> use the above, together with a 'with-vocab' word just for kicks :)
Here is some code to save/restore the in and use variables:
TUPLE: search-path in use ;
SYMBOL: search-paths
V{ } clone search-paths set-global
: push-search-path ( -- )
in get use get clone search-path boa search-paths get push ;
: pop-search-path ( -- )
search-paths get pop [ in>> in set ] [ use>> clone use set ] bi ;
Slava
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk