I recommend going through the tutorial, you can get to it by clicking
"Help" and "Your first program" or doing this at the listener prompt:
"first-program" help
You can create a word definition using colon definition:
: add-5 ( x -- y ) 5 + ;
And that expects one argument on the stack and leaves one argument on the
stack after being called.
I think that's roughly what CREATE ... DOES> is like, with a body. But
CREATE without DOES> could be either of these:
CONSTANT: five 5 ! pushes ``5`` onto the stack when called
SYMBOL: foo ! pushes the symbol itself onto the stack when
called
Best,
John.
On Sat, May 20, 2017 at 10:58 PM, Asterion Daedalus <
piercingdragone...@hotmail.com> wrote:
> Hey gang!
>
>
> So, I found Factor recently and am slowly learning to love the language.
>
>
> However, it is slow going because I am hung up on my FORTH experience.
>
>
> Is there a crossover guide for CREATE ... DOES> from FORTH to the FACTOR
> equivalent please?
>
>
> I have suspicions it is SYMBOL et al in place of CREATE yes?
>
>
> Cheers,
>
> B
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk