RollyGuy has asked for the wisdom of the Perl Monks concerning the following question:
I'm using a SWIG interface to C++ on one of my projects at work. On the C++ side, we have a 32-bit integer where the different bits represent different (named) settings. We're using perl as the interface to C++ and would like an easy way to set (and unset) these bits using named constants. In C++ there are Enumerated values that give me that functionality. Is there anything like that in perl?
Is there a good way to do this?
Is there a good way to do this?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Named Bits in a 32-bit integer
by RMGir (Prior) on Jul 31, 2002 at 18:33 UTC | |
Re: Named Bits in a 32-bit integer
by BronzeWing (Monk) on Jul 31, 2002 at 19:27 UTC | |
Re: Named Bits in a 32-bit integer
by fglock (Vicar) on Jul 31, 2002 at 19:40 UTC | |
Re: Named Bits in a 32-bit integer
by hiseldl (Priest) on Jul 31, 2002 at 18:40 UTC | |
Re: Named Bits in a 32-bit integer
by perrin (Chancellor) on Jul 31, 2002 at 18:42 UTC |
Back to
Seekers of Perl Wisdom