Deutsch English Français Italiano |
<3be5b29ade1ce269874ab1ef8abf1bd666a7fc9c@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: fir <fir@grunge.pl> Newsgroups: comp.lang.c Subject: Re: enum sets Date: Thu, 29 Aug 2024 15:09:36 +0200 Organization: i2pn2 (i2pn.org) Message-ID: <3be5b29ade1ce269874ab1ef8abf1bd666a7fc9c@i2pn2.org> References: <vaoclb$3lfbf$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 29 Aug 2024 13:09:38 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="142687"; mail-complaints-to="usenet@i2pn2.org"; posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0"; User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24 X-Spam-Checker-Version: SpamAssassin 4.0.0 In-Reply-To: <vaoclb$3lfbf$1@dont-email.me> Bytes: 2241 Lines: 59 Thiago Adams wrote: > I am wondering how useful would be to have enum sets. > > Let´s say you have a function that accepts only monospaced fonts.Then > you can use enum monospaced_font_type. Or a switch case where you need > to check all and only monospaced_font_type. > > But at same type you can store at same object monospaced_font_type or > font_type. > > enum font_type > { > enum monospaced_font_type > { > CASCADIA_FONT, > }, > ARIAL_FONT > }; > > This could be arranged in any way. > > reading yet once i dont know what you want i guess you maybe say what i understand as kinda "micro dictionary" i mean say 32 bits of enum offes space to give some section for "keys" and some section for "values" (for example upper 8 bits for keys 1-255 enumized or not - and 24 bits for values - also enumized or not...such microdictionary is good idea..i guess people sometimes use it but in fact enum statement dont support it afair though as i said the form of defining it enum { AJHJH { KJHZ, HJKJHG, HJHJH, } AJJHKJH { KJHZ, HJKJHG, HJHJH, } } may be probably bad becouse you want to have 2 keys so it should be more like enum A:shbshb enum B:shbshbskjs enum B:shbshbjskj enum A:B:shbshbskjs