I like it! If you feel like it, put it in a common place and update  
usages of bitor in extra/ to use it. We could put it in the core too,  
but I bet it depends on extra/macros.

However, you should be aware that bitor is done at compile time as  
well, assuming the constant words are inline.

: foo 1 ; inline
: bar 2 ; inline

[ foo bar bitor ] f print-dataflow
=> [ 3 ]

This might simplify your macro, if you change it to just expand to a  
series of bitor calls.

Slava

On 18-Jan-08, at 11:02 PM, Eduardo Cavazos wrote:

> Hello,
>
> In C, it's common to have various values that you combine via '|'.  
> In most of
> the C interfacing vocabs that I've used, these values are provided  
> via a
> simple word definition. So the question is, how do you OR them  
> together?
> There are a few ways to go about it. After trying out a few, I finally
> settled on a macro named 'flags'. For now, it's tucked away in the  
> obscure
> vocab 'unix.linux.ifreq'. If it becomes generally used, I'll put it  
> in a
> better place. It's very simple to use:
>
>   { S_IRUSE S_IWUSR S_IXUSR } flags
>
> I like that better than:
>
>   S_IRUSE S_IWUSR bitor S_IXUSR bitor
>
> Another benefit is that the values are combined at compile time.
>
> Ed
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to