Sujet : Re: a plain English "FizzBuZZ" idiom
De : mikegonta (at) *nospam* gmail.com (Mike Gonta)
Groupes : comp.lang.miscDate : 21. Mar 2024, 12:22:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uth1ov$24qh0$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 2024-03-20 9:26 p.m., Bruce Axtens wrote:
On 2/03/2024 4:06 am, Mike Gonta wrote:
if the counter is divisible by 3 then
The counter is always divisible by 3. It is not always *evenly* divisible by 3. Maybe you want to make that more obvious.
-Bruce
Thanks Bruce, you're absolutely right.
[
to decide if a number is evenly divisible by another number is:
divide the number by the other number returning a quotient number and a remainder number;
return true if the remainder is null;
]
Of course, in plain English idiom, the opposite (in this case) return false default statement should be obvious (as it is to the-idiom) and need not be written.
there is no "end" in idiom, for idiom is an end in itself;
-- Mike Gontalook and see - many look but few seehttps://mikegonta.com