Am Tue, 3 Mar 2015 06:40:44 -0800
schrieb John Benediktsson <[email protected]>:

Hi John,

thank you

Georg

> Hi Georg,
> 
> The ``printf`` word is a macro.  You can see it starts with MACRO:
> definition.
> 
> That means you can do this to see the code (``quot``) that is
> generated:
> 
>     [ "Test\n" printf ] expand-macros
> 
> It also means that when you call it like you did, it will essentially
> generate and run that quotation.
> 
> This is done to allow compile-time expansion of the format string for
> performance and stack effect checking.
> 
> Best,
> John.
> 
> 
> On Tue, Mar 3, 2015 at 5:54 AM, Georg Simon <[email protected]>
> wrote:
> 
> > Hallo,
> >
> >
> > http://docs.factorcode.org/content/word-printf%2Cformatting.html
> > says
> > printf ( format-string -- quot )
> >
> > but in scratchpad
> >
> > USE: formatting "test\n" printf
> >
> > works without leaving a quotation on stack.
> >
> >
> > Georg
> >
> >
> > ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming The Go Parallel Website,
> > sponsored
> > by Intel and developed in partnership with Slashdot Media, is your
> > hub for all
> > things parallel software development, from weekly thought
> > leadership blogs to
> > news, videos, case studies, tutorials and more. Take a look and
> > join the conversation now. http://goparallel.sourceforge.net/
> > _______________________________________________
> > Factor-talk mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/factor-talk
> >
> >

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to