Typically, you would need to specify which word you mean:
Given:
IN: vocab-a
: foo ( -- x ) 12 ;
IN: vocab-b
: foo ( -- x ) 14 ;
IN: vocab-c
: bar ( -- x ) foo ;
This would happen:
IN: scratchpad USE: vocab-c
Loading resource:work/vocab-c/vocab-c.factor
Loading resource:work/vocab-a/vocab-a.factor
Loading resource:work/vocab-b/vocab-b.factor
1: USE: vocab-c
^
resource:work/vocab-c/vocab-c.factor
6: : bar ( -- x ) foo ;
^
More than one vocabulary defines a word named “foo”
The following restarts are available:
:1 Use the vocab-a vocabulary
:2 Use the vocab-b vocabulary
:3 Load resource:work/vocab-c/vocab-c.factor again
You can fix this by adding something like:
FROM: vocab-a => foo ;
Or using QUALIFIED: or QUALIFIED-WITH: to fix the ambiguity.
Best,
John.
On Wed, Dec 12, 2012 at 8:47 AM, nitralime <nitral...@googlemail.com> wrote:
> Hi folks!
>
> How do the namespaces work in Factor?
> What happens if "USING: vocab-a vocab-b ;"
> leads to conflicting word definitions
> in these two vocabularies?
>
> Regards
> Nik
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk