Article View: comp.lang.c
Article #1207Re: BizFuss (was Re: Taming The Switch-Statement)
From: bartc
Date: Sat, 31 Oct 2026 13:38
Date: Sat, 31 Oct 2026 13:38
59 lines
3813 bytes
3813 bytes
On 31/10/2026 13:30, Rosario19 wrote:
> On Sat, 31 Oct 2026 12:21:13 +0000, bartc <bc@freeuk.com> wrote:
>
>> On 31/10/2026 10:39, Rosario19 wrote:
>>> On Fri, 30 Oct 2026 11:47:59 +0000, bartc wrote:
>>>
>>>> That output becomes:
>>>>
>>>> 167 is not divisible by any of (2,3,5,7)
>>>> 168 is divisible by 2
>>>> 168 is divisible by 3
>>>> 168 is divisible by 7
>>>> 169 is not divisible by any of (2,3,5,7)
>>>>
>>>> Sizes (with hard tabs and no comments):
>>>>
>>>> Your Python: 340 characters
>>>> Mine: 222 (as above; scripting)
>>>> C: 393 (not shown; not elegant)
>>>> Mine: 314 (not shown; systems lang)
>>>
>>> The APL one is 80 characters
>>
>> That's not quite right:
>>
>> * You're using 2,3,7 not 2,3,5,7, which would add 2 characters
>>
>> * You're doing 20 iterations not 200 (adds 1 more character!)
>
> code I posted is 2 input one left (the list 2 3 7) and one in the
> right (the number 20) and the APL function in the middle.
>
> 80 charaters refer only for APL function.
OK. I trusted you and didn't bother counting!
But then the 80 characters is misleading if comparing with my figures
where the inputs (factors and iterations) are hard-coded within the source.
So the true figure with 2 3 5 7 and let's say 20 iterations still, would
be 89 characters. I posted just now a version of mine, which still has
some conventional structure, with 118 characters, so it's not far off.
> So the number of characters of the function + the input is more than
> 80. It is possible change the input [input left the list 2 3 5 7,
> input right the integer 200] for have this
>
> 2 3 5 7{a???{0=?k?a/?0=a|?:???,' is not divisible by ',a????,' is
> divisible by ',k}ยจ??}200
I don't know what Thunderbird did with the Unicode here; it was alright
earlier.
> 1 is not divisible by 2 3 5 7
> 2 is divisible by 2
I suggested you can save characters (2 or 4?) by trimming those strings,
as there is extra white space here.
Technical Details
Message-ID:
<11c4qvu$1506l$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11bnfpm$i84l$1@dont-email.me> <11bng23$iblc$1@dont-email.me> <11bngj1$ifj5$1@dont-email.me> <11bnnbg$l7i1$1@dont-email.me> <11bntk0$nsbo$1@dont-email.me> <11bnvbq$olbj$1@dont-email.me> <11bo02r$otr5$1@dont-email.me> <11bo0ul$pbso$1@dont-email.me> <11bo1bc$phlr$1@dont-email.me> <tft5elp1q2ns7rhfp3rod862ks5ip3p0ms@4ax.com> <11c1kee$2lqi$2@dont-email.me> <11c205f$73k2$1@dont-email.me> <t8hbelloceeupncsjjl41ah7jd4vv2gms3@4ax.com> <11c4mfp$13b6a$1@dont-email.me> <jjqbeldmt29qt3jjrrlb7j9nuubmvleuvp@4ax.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: bartc <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: BizFuss (was Re: Taming The Switch-Statement) Date: Sat, 31 Oct 2026 13:38:05 +0000 Organization: A noiseless patient Spider Lines: 59 Message-ID: <11c4qvu$1506l$1@dont-email.me> References: <11bnfpm$i84l$1@dont-email.me> <11bng23$iblc$1@dont-email.me> <11bngj1$ifj5$1@dont-email.me> <11bnnbg$l7i1$1@dont-email.me> <11bntk0$nsbo$1@dont-email.me> <11bnvbq$olbj$1@dont-email.me> <11bo02r$otr5$1@dont-email.me> <11bo0ul$pbso$1@dont-email.me> <11bo1bc$phlr$1@dont-email.me> <tft5elp1q2ns7rhfp3rod862ks5ip3p0ms@4ax.com> <11c1kee$2lqi$2@dont-email.me> <11c205f$73k2$1@dont-email.me> <t8hbelloceeupncsjjl41ah7jd4vv2gms3@4ax.com> <11c4mfp$13b6a$1@dont-email.me> <jjqbeldmt29qt3jjrrlb7j9nuubmvleuvp@4ax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 31 Oct 2026 13:38:06 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1212629"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NRQlFi+zvcnc4mb5LOHcL"; posting-host="e68c21d34812d47967f764b98d287209" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:mX8o2npiHPpR1pIMpJ+KPlEfTXM= sha256:y6ohPeANP7tJsFQae9ozbJiLEvyUNDP9Ngn+h69izio= sha1:m4Pil1kx6qOlLJTQJVo7KqPetYE= sha256:yNUADbUD1vQLCgkOZDie8iHkJKpbnRXUERFZYUz7NfU= In-Reply-To: <jjqbeldmt29qt3jjrrlb7j9nuubmvleuvp@4ax.com> Content-Language: en-GB