Re: Bitshifting in Euphoria?
- Posted by Icy_Viking May 02, 2015
- 1673 views
petelomax said...
ne1uno said...
it helps to visualize shifted numbers in binary. shifting left by one is like multiplying by two shifting right is like dividing in half
what you are converting looks to be just a more complicated way of setting a bunch of constants to 0,1,2,4,8,16 etc pretty common way of doing this kind of thing in C headers.
That's what I would have said. The following should do it.
public enum type sfWindowStyle sfNone = 0, -- No border / title bar (this flag and all others are mutually exclusive) sfTitlebar = 1, -- Title bar + fixed border sfResize = 2, -- Titlebar + resizable border + maximize button sfClose = 4, -- Titlebar + close button sfFullscreen = 8, -- Fullscreen mode (this flag and all others are mutually exclusive) sfDefaultStyle = or_all({sfTitlebar,sfResize,sfClose}) -- Default window style end type
Pete
Thank you all for your help. It has been much appericated.