Does an expression in a logical statement need parenthesis for proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
goto L463;
}
be
if ((j1 * i1) < 1) {
goto L463;
}
Hi,
Does an expression in a logical statement need parenthesis for proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a goto L463;
}
Thanks,
Lynn
Does an expression in a logical statement need parenthesis for proper evaluation in C and/or C++?
Hi,No general statement can be made about that issue. It depends entirely
Does an expression in a logical statement need parenthesis for proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
goto L463;
}
be
if ((j1 * i1) < 1) {
goto L463;
}
Hi,
Does an expression in a logical statement need parenthesis for proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a goto L463;
}
Thanks,
Lynn
For historical reasons, bitwise or (|) and bitwise and (&) are
exceptions. Unfortunately, correcting that mistake would break
backwards compatibility ...
Otherwise, one or more parentheses
might solve the problem.
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
[...]
Otherwise, one or more parentheses
might solve the problem.
Technically correct (the best kind of correct), but *two* or more
parentheses are even better.
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,
Does an expression in a logical statement need parenthesis for proper
evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Thank you all very much.-a BTW, there were parenthesis in the old Fortran code but F2C stripped them out.-a I put them back in for my comfort as I
see them.
[...]
There is a proportion of programmers who think it is somehow blasphemy
to use more parentheses in an expression than strictly necessary.-a [...]
On 2026-11-06 08:49, David Brown wrote:
[...]
There is a proportion of programmers who think it is somehow blasphemy
to use more parentheses in an expression than strictly necessary.-a [...]
"blasphemy", wow! - The exaggerations (despite being here, allegedly, softened by the word "somehow") seem to have become in vogue, lately. (Formerly I saw such argumentation paths prevalently in one specific
poster's posts only. Communication style seems to be infectious. :-)
Most (all?) professionals seem to prefer clearness as you do. Whatever
it needs to obtain that; less parentheses or additional parentheses - depending on the expressions' complexity and context! - Largely still subjective anyway, but less of religious intensity, I'd say.
James Kuyper <jameskuyper@alumni.caltech.edu> writes:I should have said "... one or more matched pairs of parentheses ...".
[...]
Otherwise, one or more parentheses
might solve the problem.
Technically correct (the best kind of correct), but *two* or more
parentheses are even better.
On 2026-11-06 00:42, Lynn McGuire wrote:
Hi,
Does an expression in a logical statement need parenthesis for proper
evaluation in C and/or C++?
No, below (assuming i1 and j1 are arithmetic types (and not used
as "camouflaged" booleans) there's no parenthesis necessary.
The necessity of parentheses depends on the operators used. In
"C" the multiplication has higher precedence than the comparison.
I suggest to get an Operator Precedence Table from the Net and
inspect it until you got familiar with the operator precedences.
Most precedences are anyway sensibly defined as you'd expect it.
But be careful when using bit-expressions with '&', '|', and '^'
especially if used together with the comparison operators.
[...]
Lynn has been working on his "fortran" -> "C++" conversion
for over a decade now. That he isn't familar with the
C operator precedence table is rather frightening.
On 06/11/2026 09:17, Janis Papanagnou wrote:
On 2026-11-06 08:49, David Brown wrote:
[...]
There is a proportion of programmers who think it is somehow
blasphemy to use more parentheses in an expression than strictly
necessary.-a [...]
"blasphemy", wow! - The exaggerations (despite being here, allegedly,
softened by the word "somehow") seem to have become in vogue, lately.
(Formerly I saw such argumentation paths prevalently in one specific
poster's posts only. Communication style seems to be infectious. :-)
I thought the term "blasphemy" was so obviously an exaggeration that it could not be taken realistically.-a[...]
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,Thank you all very much.-a BTW, there were parenthesis in the old
Does an expression in a logical statement need parenthesis for
proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not
be a problem adding the parentheses. Generated code that contains
"goto L463" is clearly not intended for humans anyway (at least, not
without a good deal of effort).
There is a proportion of programmers who think it is somehow blasphemy
to use more parentheses in an expression than strictly necessary.
That type of programmer will also disapprove of the extra braces
around the "goto" in your example.
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
On 2026-11-06 00:42, Lynn McGuire wrote:
Hi,
Does an expression in a logical statement need parenthesis for proper
evaluation in C and/or C++?
No, below (assuming i1 and j1 are arithmetic types (and not used
as "camouflaged" booleans) there's no parenthesis necessary.
The necessity of parentheses depends on the operators used. In
"C" the multiplication has higher precedence than the comparison.
I suggest to get an Operator Precedence Table from the Net and
inspect it until you got familiar with the operator precedences.
Most precedences are anyway sensibly defined as you'd expect it.
But be careful when using bit-expressions with '&', '|', and '^'
especially if used together with the comparison operators.
Lynn has been working on his "fortran" -> "C++" conversion
for over a decade now. That he isn't familar with the
C operator precedence table is rather frightening.
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
On 2026-11-06 00:42, Lynn McGuire wrote:
Hi,
Does an expression in a logical statement need parenthesis for proper
evaluation in C and/or C++?
No, below (assuming i1 and j1 are arithmetic types (and not used
as "camouflaged" booleans) there's no parenthesis necessary.
The necessity of parentheses depends on the operators used. In
"C" the multiplication has higher precedence than the comparison.
I suggest to get an Operator Precedence Table from the Net and
inspect it until you got familiar with the operator precedences.
Most precedences are anyway sensibly defined as you'd expect it.
But be careful when using bit-expressions with '&', '|', and '^'
especially if used together with the comparison operators.
Lynn has been working on his "fortran" -> "C++" conversion
for over a decade now. That he isn't familar with the
C operator precedence table is rather frightening.
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,
Does an expression in a logical statement need parenthesis for proper
evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Thank you all very much.-a BTW, there were parenthesis in the old
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not be
a problem adding the parentheses.-a Generated code that contains "goto
L463" is clearly not intended for humans anyway (at least, not without a good deal of effort).
There is a proportion of programmers who think it is somehow blasphemy
to use more parentheses in an expression than strictly necessary.-a That type of programmer will also disapprove of the extra braces around the "goto" in your example.
There is a proportion of programmers who think you should /always/ use parentheses to show the precedence of operators.
Most programmers, I think, are in the middle.-a Parentheses here can make the expression clearer at a glance, but it is also obvious what it means when not using extra parentheses.
situations where the operator precedence is not as well known, or may
differ between programming languages - mixing bitwise and logical
operators and equality operators are examples.
You can get a reasonable balance using gcc's warnings - these also have
the big advantage of making it easy to check!-a "-Wparentheses" (enabled
by -Wall) will catch, for example, "a < b == c" which parses as "a < (b
== c)".-a If "-Wparentheses" does not lead to complaints, then your generated code is probably okay without the extra parentheses - but you
can still add them here if you prefer.
In general, I think you want your generated code to pass "gcc -O2 -Wall" cleanly (or the clang equivalent, which is /not/ -Weverything!).-a You
may even aim for -Wextra.
David Brown <david.brown@hesbynett.no> writes:
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,Thank you all very much.-a BTW, there were parenthesis in the old
Does an expression in a logical statement need parenthesis for
proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not
be a problem adding the parentheses. Generated code that contains
"goto L463" is clearly not intended for humans anyway (at least, not
without a good deal of effort).
My understanding is that the C++ code being generated is intended to be maintained as C++ code. Lynn can confirm or deny that. He's using f2c
and a lot of manual cleanup.
In this particular example:
if ((j1 * i1) < 1)
I find the inner parentheses slightly distracting. I'd wouldn't
write it that way myself, but it wouldn't particularly bother me
if I saw it in someone else's code, and I likely wouldn't mention
it unless asked.
If this were my project, as long as I'm having to do substantial
manual cleanup, I'd probably change it to:
if (j1 * i1) < 1)
In a quick test, f2c didn't add parentheses given a Fortran input of
"if (j1 * i1 < 1)". Either the inner parentheses were there in the
Fortran code, or something else is going on.
There is a proportion of programmers who think it is somehow blasphemy
to use more parentheses in an expression than strictly necessary.
That type of programmer will also disapprove of the extra braces
around the "goto" in your example.
Small quibble: The extra parentheses were in the condition in an "if" statement, not a goto. Parentheses in a "goto" statement would be a
syntax error.
[...]
David Brown <david.brown@hesbynett.no> writes:
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,Thank you all very much.-a BTW, there were parenthesis in the old
Does an expression in a logical statement need parenthesis for
proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not
be a problem adding the parentheses. Generated code that contains
"goto L463" is clearly not intended for humans anyway (at least, not
without a good deal of effort).
My understanding is that the C++ code being generated is intended to be maintained as C++ code. Lynn can confirm or deny that. He's using f2c
and a lot of manual cleanup.
In this particular example:
if ((j1 * i1) < 1)
I find the inner parentheses slightly distracting. I'd wouldn't
write it that way myself, but it wouldn't particularly bother me
if I saw it in someone else's code, and I likely wouldn't mention
it unless asked.
If this were my project, as long as I'm having to do substantial
manual cleanup, I'd probably change it to:
if (j1 * i1) < 1)...
David Brown <david.brown@hesbynett.no> writes:
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,Thank you all very much.-a BTW, there were parenthesis in the old
Does an expression in a logical statement need parenthesis for
proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not
be a problem adding the parentheses. Generated code that contains
"goto L463" is clearly not intended for humans anyway (at least, not
without a good deal of effort).
My understanding is that the C++ code being generated is intended to be maintained as C++ code. Lynn can confirm or deny that. He's using f2c
and a lot of manual cleanup.
In this particular example:
if ((j1 * i1) < 1)
I find the inner parentheses slightly distracting. I'd wouldn't
write it that way myself, but it wouldn't particularly bother me
if I saw it in someone else's code, and I likely wouldn't mention
it unless asked.
If this were my project, as long as I'm having to do substantial
manual cleanup, I'd probably change it to:
if (j1 * i1) < 1)^^^^^^^^^^^^^^^^^
In a quick test, f2c didn't add parentheses given a Fortran input of
"if (j1 * i1 < 1)". Either the inner parentheses were there in the
Fortran code, or something else is going on.
There is a proportion of programmers who think it is somehow blasphemy
to use more parentheses in an expression than strictly necessary.
That type of programmer will also disapprove of the extra braces
around the "goto" in your example.
Small quibble: The extra parentheses were in the condition in an "if" statement, not a goto. Parentheses in a "goto" statement would be a
syntax error.
[...]
David Brown <david.brown@hesbynett.no> writes:...
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,Thank you all very much.-a BTW, there were parenthesis in the old
Does an expression in a logical statement need parenthesis for
proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not
be a problem adding the parentheses. Generated code that contains
"goto L463" is clearly not intended for humans anyway (at least, not
without a good deal of effort).
My understanding is that the C++ code being generated is intended to be maintained as C++ code. Lynn can confirm or deny that. He's using f2c
and a lot of manual cleanup.
On 11/6/2026 12:50 PM, Keith Thompson wrote:
David Brown <david.brown@hesbynett.no> writes:...
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,Thank you all very much.-a BTW, there were parenthesis in the old
Does an expression in a logical statement need parenthesis for
proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not
be a problem adding the parentheses. Generated code that contains
"goto L463" is clearly not intended for humans anyway (at least, not
without a good deal of effort).
My understanding is that the C++ code being generated is intended to be
maintained as C++ code. Lynn can confirm or deny that. He's using f2c
and a lot of manual cleanup.
Yes. I am tired of fixing the thousands of Fortran to C calls and C to Fortran calls when we move to a new Fortran compiler or a new C/C++ compiler. This is one of the problems that has kept us on the obsolete Watcom F77/C/C++ compilers for over 30 years.
Yup, I am moving to C++ totally. Actually, a very mild version of
C++ for my 850,000 line calculation engine. No classes, all
character strings in std::string variables, and a few other things.
The old Fortran code was not type safe at all, the new C++ code is
trying to use type safety everywhere.
On 11/6/2026 12:50 PM, Keith Thompson wrote:[...]
If this were my project, as long as I'm having to do substantial
manual cleanup, I'd probably change it to:
if (j1 * i1) < 1)...
Huh? I am confused. Aren't you missing a left parenthesis there?
On Fri, 6 Nov 2026 15:37:33 -0600, Lynn McGuire wrote:
On 11/6/2026 12:50 PM, Keith Thompson wrote:
David Brown <david.brown@hesbynett.no> writes:...
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,Thank you all very much.-a BTW, there were parenthesis in the old
Does an expression in a logical statement need parenthesis for
proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not
be a problem adding the parentheses. Generated code that contains
"goto L463" is clearly not intended for humans anyway (at least, not
without a good deal of effort).
My understanding is that the C++ code being generated is intended to be
maintained as C++ code. Lynn can confirm or deny that. He's using f2c
and a lot of manual cleanup.
Yes. I am tired of fixing the thousands of Fortran to C calls and C to
Fortran calls when we move to a new Fortran compiler or a new C/C++
compiler. This is one of the problems that has kept us on the obsolete
Watcom F77/C/C++ compilers for over 30 years.
Fortran's ISO C binding feature fixed this Fortran <--> C issue some
20 years ago. Granted, CFI was not available until 2018.
Does an expression in a logical statement need parenthesis for proper evaluation in C and/or C++?
On 2026-11-06 10:50, David Brown wrote:
On 06/11/2026 09:17, Janis Papanagnou wrote:
On 2026-11-06 08:49, David Brown wrote:
[...]
There is a proportion of programmers who think it is somehow
blasphemy to use more parentheses in an expression than strictly
necessary.-a [...]
"blasphemy", wow! - The exaggerations (despite being here, allegedly,
softened by the word "somehow") seem to have become in vogue, lately.
(Formerly I saw such argumentation paths prevalently in one specific
poster's posts only. Communication style seems to be infectious. :-)
I thought the term "blasphemy" was so obviously an exaggeration that
it could not be taken realistically.-a[...]
No worries. (You may have noticed my smiley?)
But the intention of my post was also to make obvious to better
not foster such language, even if it was meant as "accentuation".
(You know how pathological some posters can get in that respect.)
David Brown <david.brown@hesbynett.no> writes:
On 06/11/2026 02:07, Lynn McGuire wrote:
On 11/5/2026 5:42 PM, Lynn McGuire wrote:
Hi,Thank you all very much.-a BTW, there were parenthesis in the old
Does an expression in a logical statement need parenthesis for
proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Thanks,
Lynn
Fortran code but F2C stripped them out.-a I put them back in for my
comfort as I see them.
Since you are generating the C++ code automatically, there should not
be a problem adding the parentheses. Generated code that contains
"goto L463" is clearly not intended for humans anyway (at least, not
without a good deal of effort).
My understanding is that the C++ code being generated is intended to be maintained as C++ code. Lynn can confirm or deny that. He's using f2c
and a lot of manual cleanup.
In this particular example:
if ((j1 * i1) < 1)
I find the inner parentheses slightly distracting. I'd wouldn't
write it that way myself, but it wouldn't particularly bother me
if I saw it in someone else's code, and I likely wouldn't mention
it unless asked.
If this were my project, as long as I'm having to do substantial
manual cleanup, I'd probably change it to:
if (j1 * i1) < 1)
In a quick test, f2c didn't add parentheses given a Fortran input of
"if (j1 * i1 < 1)". Either the inner parentheses were there in the
Fortran code, or something else is going on.
There is a proportion of programmers who think it is somehow blasphemy
to use more parentheses in an expression than strictly necessary.
That type of programmer will also disapprove of the extra braces
around the "goto" in your example.
Small quibble: The extra parentheses were in the condition in an "if" statement, not a goto. Parentheses in a "goto" statement would be a
syntax error.
[...]
My impression is that he is still fiddling with his fork of f2c with an
aim to getting as much automation as he can to minimise the manual
cleanup, but I could easily be wrong here.-a I have no idea if it is possible to automate something to help with such gotos.
On 2026-11-07 12:48, David Brown wrote:Fwiw, I ported some of my work over to AppleSoft BASIC just to show it
[...]
My impression is that he is still fiddling with his fork of f2c with
an aim to getting as much automation as he can to minimise the manual
cleanup, but I could easily be wrong here.-a I have no idea if it is
possible to automate something to help with such gotos.
It might suffice for such an automation tasks to just mirror such
'goto' structures (unless you intend to create better structured
code through code transformations). - Not long ago I refactored a
legacy program to obtain an equivalent implementation in another
language and the de-spaghettifying turned out to have been really
nasty. (The code had severely convoluted 'goto's and not a single
structured element.) - In principal it's possible to de-'goto' any
source code to obtain structured code. Since I've no experience
with such tools I'm curious what experiences exists in that respect, especially for trans-language transformations (from a heavily 'goto'
biased language (BASIC, FORTRAN?) to some structured language). -
While looking into the Net and concerning this thread I stumbled
across this reply, though:
-a "f2c or pet (for Fortran/C): Older research tools designed
-a-a to parse flat code graphs and reconstruct clean, structured
-a-a if/else and loop components."
which gave the impression that 'f2c' would be able to remove those
'goto's and so I'm wondering why there's (still) 'goto's in the
OP's sample code.
On 2026-11-07 12:48, David Brown wrote:
[...]
My impression is that he is still fiddling with his fork of f2c with
an aim to getting as much automation as he can to minimise the manual
cleanup, but I could easily be wrong here.-a I have no idea if it is
possible to automate something to help with such gotos.
It might suffice for such an automation tasks to just mirror such
'goto' structures (unless you intend to create better structured
code through code transformations). - Not long ago I refactored a
legacy program to obtain an equivalent implementation in another
language and the de-spaghettifying turned out to have been really
nasty. (The code had severely convoluted 'goto's and not a single
structured element.) - In principal it's possible to de-'goto' any
source code to obtain structured code. Since I've no experience
with such tools I'm curious what experiences exists in that respect, especially for trans-language transformations (from a heavily 'goto'
biased language (BASIC, FORTRAN?) to some structured language). -
While looking into the Net and concerning this thread I stumbled
across this reply, though:
-a "f2c or pet (for Fortran/C): Older research tools designed
-a-a to parse flat code graphs and reconstruct clean, structured
-a-a if/else and loop components."
which gave the impression that 'f2c' would be able to remove those
'goto's and so I'm wondering why there's (still) 'goto's in the
OP's sample code.
Janis
On 11/7/2026 1:39 PM, Janis Papanagnou wrote:
[...]
While looking into the Net and concerning this thread I stumbled
across this reply, though:
-a-a "f2c or pet (for Fortran/C): Older research tools designed
-a-a-a to parse flat code graphs and reconstruct clean, structured
-a-a-a if/else and loop components."
which gave the impression that 'f2c' would be able to remove those
'goto's and so I'm wondering why there's (still) 'goto's in the
OP's sample code.
F2C is automagically restructuring my code to the first level.-a Maybe
the second level sometimes.-a The number of gotos is reduced by 80 or
90%.-a Way past the point that I don't care.-a If a goto is jumping
halfway down a method then replacing it with a monster if then is just
crazy so F2C skips that case.-a I am not modifying F2C anymore.
If wanted, I can post comparisons of a couple of my subroutines and the resulting methods.
Fwiw, I ported some of my work over to AppleSoft BASIC just to show it
can be portable. But, my work needed some recursion. BASIC, good luck. However, there is a way, giving BASIC a stack. So for a simple Koch
fractal based on any line:
[snip]
4040-a-a-a-a IF V0(3) < 0 THEN V0(3) = INT(V0(3) - .5)
[...]
On 2026-11-07 21:39, Lynn McGuire wrote:
On 11/7/2026 1:39 PM, Janis Papanagnou wrote:
[...]
While looking into the Net and concerning this thread I stumbled
across this reply, though:
-a-a "f2c or pet (for Fortran/C): Older research tools designed
-a-a-a to parse flat code graphs and reconstruct clean, structured
-a-a-a if/else and loop components."
which gave the impression that 'f2c' would be able to remove those
'goto's and so I'm wondering why there's (still) 'goto's in the
OP's sample code.
F2C is automagically restructuring my code to the first level.-a Maybe
the second level sometimes.-a The number of gotos is reduced by 80 or
90%.-a Way past the point that I don't care.-a If a goto is jumping
halfway down a method then replacing it with a monster if then is just
crazy so F2C skips that case.-a I am not modifying F2C anymore.
Thanks for that background information.
If wanted, I can post comparisons of a couple of my subroutines and
the resulting methods.
Don't bother, since I'm not doing Fortran, I was just interested
in principle here.
Your numbers of 80-90% reduction is, I think, quite good already.
But given that your C-code sample's label number is still "L463"
I don't want to see that code; I'm still traumatized by the code
that I had tried to de-goto-fy not long ago.
Janis
On 11/7/2026 6:30 PM, Janis Papanagnou wrote:
[...] I'm still traumatized by the code
that I had tried to de-goto-fy not long ago.
At least I do not have any "come from"s in my code.
Does an expression in a logical statement need parenthesis for proper evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a goto L463;
}
if (j1 * i1 < 1) {The latter one leads to more optimized code !
-a-a-a goto L463;
}
...
if ((j1 * i1) < 1) {
-a-a-a goto L463;
}
On Thu 11/5/2026 3:42 PM, Lynn McGuire wrote:You are correct, parentheses are not needed. However, there's a related question that could have a different answer: should an arithmetic
Does an expression in a logical statement need parenthesis for properThe whole `j1 * i1 < 1` is an expression in this case. It is parsed in accordance with the grammar, which ultimately makes it equivalent to
evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a goto L463;
}
`(j1 * i1) < 1`.
Your question seems to suggest that the `j1 * i1` part somehow qualifies
as an expression, while the rest of it does not. That's not how it
works. The language does not give the `j1 * i1` part any special status.
On 2026-11-08 02:13, Lynn McGuire wrote:
On 11/7/2026 6:30 PM, Janis Papanagnou wrote:
[...]-a I'm still traumatized by the code
that I had tried to de-goto-fy not long ago.
At least I do not have any "come from"s in my code.
:-)
I suppose you have Intercal in mind? ;-)
Janis
On 2026-11-09 02:32, Andrey Tarasevich wrote:
On Thu 11/5/2026 3:42 PM, Lynn McGuire wrote:
Does an expression in a logical statement need parenthesis for properThe whole `j1 * i1 < 1` is an expression in this case. It is parsed in
evaluation in C and/or C++?
In other words, should
if (j1 * i1 < 1) {
-a-a-a goto L463;
}
be
if ((j1 * i1) < 1) {
-a-a-a goto L463;
}
accordance with the grammar, which ultimately makes it equivalent to
`(j1 * i1) < 1`.
Your question seems to suggest that the `j1 * i1` part somehow qualifies
as an expression, while the rest of it does not. That's not how it
works. The language does not give the `j1 * i1` part any special status.
You are correct, parentheses are not needed. However, there's a related question that could have a different answer: should an arithmetic
expression that is an operand of a comparison expression be
parenthesized - not because it needs the parenthesis, but to clarify
what the grammar already guarantees?
I tend not to use unnecessary parentheses, and I know the grammar well
enough to correctly identify them - but many people don't know the
grammar that well, which might include the next person to maintain my
code. There are reasonable arguments that I should use parentheses more
than I actually do, for the benefit of such people.
On 11/8/2026 2:55 AM, Janis Papanagnou wrote:
On 2026-11-08 02:13, Lynn McGuire wrote:
On 11/7/2026 6:30 PM, Janis Papanagnou wrote:
[...]-a I'm still traumatized by the code
that I had tried to de-goto-fy not long ago.
At least I do not have any "come from"s in my code.
:-)
I suppose you have Intercal in mind? ;-)
Fortran of course.
-a-a https://en.wikipedia.org/wiki/COMEFROM
I tend not to use unnecessary parentheses, and I know the grammar
well enough to correctly identify them - but many people don't know
the grammar that well, which might include the next person to
maintain my code.
On Mon, 9 Nov 2026 06:00:40 -0500, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar
well enough to correctly identify them - but many people don't know
the grammar that well, which might include the next person to
maintain my code.
Even if they havenrCOt committed the precedence table to memory, surely
they have the ability to look things up online <https://en.cppreference.com/c/language/operator_precedence>.
If someone has regular trouble with certain language features, why
arenrCOt pages that clarify those very issues not already in their
browser bookmarks?
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
On Mon, 9 Nov 2026 06:00:40 -0500, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar
well enough to correctly identify them - but many people don't know
the grammar that well, which might include the next person to
maintain my code.
Even if they havenrCOt committed the precedence table to memory, surely
they have the ability to look things up online
<https://en.cppreference.com/c/language/operator_precedence>.
If someone has regular trouble with certain language features, why
arenrCOt pages that clarify those very issues not already in their
browser bookmarks?
If I haven't memorized all the precedence levels, I greatly prefer
an expression I can read at a glance to one that requires me to
consult some document before I can be sure what it means, just so
I can continue to the next line of code.
Just one example: I couldn't tell you whether `^` or `|` binds more
tightly without looking it up. If you can, that's great.
Preferences for *how many* strictly semantically unnecessary
parentheses are appropriate vary greatly, but few C programmers
would insist on none.
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
On Mon, 9 Nov 2026 06:00:40 -0500, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar
well enough to correctly identify them - but many people don't know
the grammar that well, which might include the next person to
maintain my code.
Even if they havenrCOt committed the precedence table to memory, surely
they have the ability to look things up online
<https://en.cppreference.com/c/language/operator_precedence>.
If someone has regular trouble with certain language features, why
arenrCOt pages that clarify those very issues not already in their
browser bookmarks?
If I haven't memorized all the precedence levels, I greatly prefer
an expression I can read at a glance to one that requires me to
consult some document before I can be sure what it means, just so
I can continue to the next line of code.
Just one example: I couldn't tell you whether `^` or `|` binds more
tightly without looking it up. If you can, that's great.
Preferences for *how many* strictly semantically unnecessary
parentheses are appropriate vary greatly, but few C programmers
would insist on none.
On 11/9/2026 6:54 PM, Keith Thompson wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
On Mon, 9 Nov 2026 06:00:40 -0500, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar
well enough to correctly identify them - but many people don't know
the grammar that well, which might include the next person to
maintain my code.
Even if they havenrCOt committed the precedence table to memory, surely
they have the ability to look things up online
<https://en.cppreference.com/c/language/operator_precedence>.
If someone has regular trouble with certain language features, why
arenrCOt pages that clarify those very issues not already in their
browser bookmarks?
If I haven't memorized all the precedence levels, I greatly prefer
an expression I can read at a glance to one that requires me to
consult some document before I can be sure what it means, just so
I can continue to the next line of code.
Just one example: I couldn't tell you whether `^` or `|` binds more
tightly without looking it up.-a If you can, that's great.
Preferences for *how many* strictly semantically unnecessary
parentheses are appropriate vary greatly, but few C programmers
would insist on none.
I ship my software written in four different software languages.-a C++, Fortran, Visual Basic, and C#.-a Remembering the nuances of each is tricky.-a I find it best to be safe.
I have shipped software in about a dozen software languages in my 51
year career.-a C++, Fortran IV (66), Fortran 77, Visual Basic,
C#, Turbo
Pascal, Basic, Turbo C, Unix C, IBM 370 Assembler, Intel x86 Assembler, AWK.-a I think that I am leaving out a couple that I cannot remember at
the moment.
Lynn
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
On Mon, 9 Nov 2026 06:00:40 -0500, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar
well enough to correctly identify them - but many people don't know
the grammar that well, which might include the next person to
maintain my code.
Even if they havenrCOt committed the precedence table to memory, surely
they have the ability to look things up online
<https://en.cppreference.com/c/language/operator_precedence>.
If someone has regular trouble with certain language features, why
arenrCOt pages that clarify those very issues not already in their
browser bookmarks?
If I haven't memorized all the precedence levels, I greatly prefer
an expression I can read at a glance to one that requires me to
consult some document before I can be sure what it means, just so
I can continue to the next line of code.
Just one example: I couldn't tell you whether `^` or `|` binds more
tightly without looking it up. If you can, that's great.
Preferences for *how many* strictly semantically unnecessary
parentheses are appropriate vary greatly, but few C programmers
would insist on none.
Am 06.11.2026 um 00:42 schrieb Lynn McGuire:
if (j1 * i1 < 1) {The latter one leads to more optimized code !
-a-a-a-a goto L463;
}
...
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Op 09.nov.2026 om 10:03 schreef Bonita Montero:
Am 06.11.2026 um 00:42 schrieb Lynn McGuire:
if (j1 * i1 < 1) {The latter one leads to more optimized code !
-a-a-a-a goto L463;
}
...
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Really? Why?
On 2026-11-09 12:00, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar well
enough to correctly identify them - but many people don't know the
grammar that well, which might include the next person to maintain my
code. There are reasonable arguments that I should use parentheses more
than I actually do, for the benefit of such people.
I'm "a bit" unsettled by the idea of a programmer who is unfamiliar
with the language in general or the grammar specifically! (I know
there's such folks writing programs.) I wouldn't write programs in
ways to satisfy such folks. I'd certainly write programs in ways to
keep the program maintainable focusing on the language specifics not imagining that the piece of code might be handled by a Neanderthal.
Op 09.nov.2026 om 10:03 schreef Bonita Montero:
Am 06.11.2026 um 00:42 schrieb Lynn McGuire:
if (j1 * i1 < 1) {The latter one leads to more optimized code !
-a-a-a-a goto L463;
}
...
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Really? Why?
On 11/9/2026 8:39 PM, Lynn McGuire wrote:
On 11/9/2026 6:54 PM, Keith Thompson wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
On Mon, 9 Nov 2026 06:00:40 -0500, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar
well enough to correctly identify them - but many people don't know
the grammar that well, which might include the next person to
maintain my code.
Even if they havenrCOt committed the precedence table to memory, surely >>>> they have the ability to look things up online
<https://en.cppreference.com/c/language/operator_precedence>.
If someone has regular trouble with certain language features, why
arenrCOt pages that clarify those very issues not already in their
browser bookmarks?
If I haven't memorized all the precedence levels, I greatly prefer
an expression I can read at a glance to one that requires me to
consult some document before I can be sure what it means, just so
I can continue to the next line of code.
Just one example: I couldn't tell you whether `^` or `|` binds more
tightly without looking it up.-a If you can, that's great.
Preferences for *how many* strictly semantically unnecessary
parentheses are appropriate vary greatly, but few C programmers
would insist on none.
I ship my software written in four different software languages.-a C++,
Fortran, Visual Basic, and C#.-a Remembering the nuances of each is
tricky.-a I find it best to be safe.
I have shipped software in about a dozen software languages in my 51
year career.-a C++, Fortran IV (66), Fortran 77, Visual Basic,
VB 6? Do you use access as well?
C#, Turbo Pascal, Basic, Turbo C, Unix C, IBM 370 Assembler, Intel x86
Assembler, AWK.-a I think that I am leaving out a couple that I cannot
remember at the moment.
Lynn
On 11/10/2026 12:25 AM, Chris M. Thomasson wrote:
On 11/9/2026 8:39 PM, Lynn McGuire wrote:
On 11/9/2026 6:54 PM, Keith Thompson wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
On Mon, 9 Nov 2026 06:00:40 -0500, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar
well enough to correctly identify them - but many people don't know >>>>>> the grammar that well, which might include the next person to
maintain my code.
Even if they havenrCOt committed the precedence table to memory, surely >>>>> they have the ability to look things up online
<https://en.cppreference.com/c/language/operator_precedence>.
If someone has regular trouble with certain language features, why
arenrCOt pages that clarify those very issues not already in their
browser bookmarks?
If I haven't memorized all the precedence levels, I greatly prefer
an expression I can read at a glance to one that requires me to
consult some document before I can be sure what it means, just so
I can continue to the next line of code.
Just one example: I couldn't tell you whether `^` or `|` binds more
tightly without looking it up.-a If you can, that's great.
Preferences for *how many* strictly semantically unnecessary
parentheses are appropriate vary greatly, but few C programmers
would insist on none.
I ship my software written in four different software languages.-a C+
+, Fortran, Visual Basic, and C#.-a Remembering the nuances of each is
tricky.-a I find it best to be safe.
I have shipped software in about a dozen software languages in my 51
year career.-a C++, Fortran IV (66), Fortran 77, Visual Basic,
VB 6? Do you use access as well?
C#, Turbo Pascal, Basic, Turbo C, Unix C, IBM 370 Assembler, Intel
x86 Assembler, AWK.-a I think that I am leaving out a couple that I
cannot remember at the moment.
Lynn
Nope.-a It is just a sample app with source code to show how to connect
to my DLLs using VB.
I have several samples apps including an Excel
spreadsheet.-a I have never used Access.
All of my calculation software is currently Win32 DLLs so my customers
can easily use them for custom calculations.
On 11/10/2026 12:48 PM, Lynn McGuire wrote:
On 11/10/2026 12:25 AM, Chris M. Thomasson wrote:
On 11/9/2026 8:39 PM, Lynn McGuire wrote:
On 11/9/2026 6:54 PM, Keith Thompson wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
On Mon, 9 Nov 2026 06:00:40 -0500, James Kuyper wrote:
I tend not to use unnecessary parentheses, and I know the grammar >>>>>>> well enough to correctly identify them - but many people don't know >>>>>>> the grammar that well, which might include the next person to
maintain my code.
Even if they havenrCOt committed the precedence table to memory, surely >>>>>> they have the ability to look things up online
<https://en.cppreference.com/c/language/operator_precedence>.
If someone has regular trouble with certain language features, why >>>>>> arenrCOt pages that clarify those very issues not already in their >>>>>> browser bookmarks?
If I haven't memorized all the precedence levels, I greatly prefer
an expression I can read at a glance to one that requires me to
consult some document before I can be sure what it means, just so
I can continue to the next line of code.
Just one example: I couldn't tell you whether `^` or `|` binds more
tightly without looking it up.-a If you can, that's great.
Preferences for *how many* strictly semantically unnecessary
parentheses are appropriate vary greatly, but few C programmers
would insist on none.
I ship my software written in four different software languages.-a C+ >>>> +, Fortran, Visual Basic, and C#.-a Remembering the nuances of each
is tricky.-a I find it best to be safe.
I have shipped software in about a dozen software languages in my 51
year career.-a C++, Fortran IV (66), Fortran 77, Visual Basic,
VB 6? Do you use access as well?
C#, Turbo Pascal, Basic, Turbo C, Unix C, IBM 370 Assembler, Intel
x86 Assembler, AWK.-a I think that I am leaving out a couple that I
cannot remember at the moment.
Lynn
Nope.-a It is just a sample app with source code to show how to connect
to my DLLs using VB.
That's fine. Fwiw, I wrote a full blown specialized whole home/pool inspection system using VB 6, Access and Word 6 for my Dad way back in
the day. What service pack are you using? Those were fun... ahh, back in
the day... ;^o
I have several samples apps including an Excel spreadsheet.-a I have
never used Access.
Actually, Access worked pretty damn good for my needs. Then, iirc, it
got superseded by SQL server.
All of my calculation software is currently Win32 DLLs so my customers
can easily use them for custom calculations.
Well, that should work fine. Once they know the API, anybody should be
able to use them. Iirc, it was a little strange to map DLL's created in
C to the VB 6 data types. But, can be done for sure.
Am 10.11.2026 um 09:58 schrieb Fred. Zwarts:
Op 09.nov.2026 om 10:03 schreef Bonita Montero:
Am 06.11.2026 um 00:42 schrieb Lynn McGuire:
if (j1 * i1 < 1) {The latter one leads to more optimized code !
-a-a-a-a goto L463;
}
...
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Really? Why?
It's faster the more braces you have.
On 11/10/2026 8:41 AM, Bonita Montero wrote:
Am 10.11.2026 um 09:58 schrieb Fred. Zwarts:
Op 09.nov.2026 om 10:03 schreef Bonita Montero:
Am 06.11.2026 um 00:42 schrieb Lynn McGuire:
if (j1 * i1 < 1) {The latter one leads to more optimized code !
-a-a-a-a goto L463;
}
...
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Really? Why?
It's faster the more braces you have.
You mean taking pressure off of the compiler stages, or what?
It's actually depending on the quotient of parenthesis and braces,Great !
just to be clear. If the number of braces is f(i) and the number
of parenthesis is f(i+1), where 'f' is the Fibonacci function,
the compiler will be able to create faster code, whereas if these
numbers are swapped it will create slower code. (Obviously, no?)
On Thu, 5 Nov 2026 19:52:31 -0500, James Kuyper wrote:
For historical reasons, bitwise or (|) and bitwise and (&) are
exceptions. Unfortunately, correcting that mistake would break
backwards compatibility ...
The only real issue is that bitwise ops have lower priority than
comparisons, when they should be higher. If they were higher, then an expression like
(bitval & mask) == desired_value
wouldnrCOt need parentheses.
Realistically, can anyone offer *any* real-world C code that
uses an expression that would be parenthesized like
a & (b == c)
On 06/11/2026 01:12, Lawrence DrCOOliveiro wrote:
On Thu, 5 Nov 2026 19:52:31 -0500, James Kuyper wrote:
For historical reasons, bitwise or (|) and bitwise and (&) are
exceptions. Unfortunately, correcting that mistake would break
backwards compatibility ...
The only real issue is that bitwise ops have lower priority than
comparisons, when they should be higher. If they were higher, then an
expression like
(bitval & mask) == desired_value
wouldnrCOt need parentheses.
Realistically, can anyone offer *any* real-world C code that
uses an expression that would be parenthesized like
a & (b == c)
bitwise ops are well used to do logic on 'booleans'
On 12/11/2026 19:44, Tristan Wibberley wrote:
On 06/11/2026 01:12, Lawrence DrCOOliveiro wrote:
On Thu, 5 Nov 2026 19:52:31 -0500, James Kuyper wrote:
For historical reasons, bitwise or (|) and bitwise and (&) are
exceptions. Unfortunately, correcting that mistake would break
backwards compatibility ...
The only real issue is that bitwise ops have lower priority than
comparisons, when they should be higher. If they were higher, then an
expression like
(bitval & mask) == desired_value
wouldnrCOt need parentheses.
Realistically, can anyone offer *any* real-world C code that
uses an expression that would be parenthesized like
a & (b == c)
bitwise ops are well used to do logic on 'booleans'
oh yeah, for C this is all "int" so I think I would only want to do it
with 2s-complement architectures. I think C++ is fine because they're
"bool" instead.
On 2026-11-09 21:24, Lynn McGuire wrote:
On 11/8/2026 2:55 AM, Janis Papanagnou wrote:
On 2026-11-08 02:13, Lynn McGuire wrote:
On 11/7/2026 6:30 PM, Janis Papanagnou wrote:
[...]-a I'm still traumatized by the code
that I had tried to de-goto-fy not long ago.
At least I do not have any "come from"s in my code.
:-)
I suppose you have Intercal in mind? ;-)
Fortran of course.
-a-a https://en.wikipedia.org/wiki/COMEFROM
Jesus! 8-o
Interesting article; I didn't know that "joke" was
considered also by those more serious languages.
On 12/11/2026 23:27, Tristan Wibberley wrote:
On 12/11/2026 19:44, Tristan Wibberley wrote:
On 06/11/2026 01:12, Lawrence DrCOOliveiro wrote:
On Thu, 5 Nov 2026 19:52:31 -0500, James Kuyper wrote:
For historical reasons, bitwise or (|) and bitwise and (&) are
exceptions. Unfortunately, correcting that mistake would break
backwards compatibility ...
The only real issue is that bitwise ops have lower priority than
comparisons, when they should be higher. If they were higher, then an
expression like
-a-a-a-a (bitval & mask) == desired_value
wouldnrCOt need parentheses.
Realistically, can anyone offer *any* real-world C code that
uses an expression that would be parenthesized like
-a-a-a-a a & (b == c)
bitwise ops are well used to do logic on 'booleans'
oh yeah, for C this is all "int" so I think I would only want to do it
with 2s-complement architectures. I think C++ is fine because they're
"bool" instead.
In C, the equality and relational operators evaluate to an "int" value
of either 0 or 1.-a They never result in any other value.
The only time an optimising
compiler actually follows the rules about what is and what is not
evaluated, is when there are side-effects that could potentially lead to observable behaviour.
The most sensible way to write your code - IMHO - is to use bitwise
operators only when you actually mean bitwise operations such as
masking.-a Use logical operators when you mean logical operations - "this
is true AND that is true" or "this is true OR that is true".-a And of
course, use logical operators if you need to rely on the short-circuit evaluation or order of evaluation.
And don't bother with the "register" keyword.-a Optimising compilers have ignored that for decades, and C++ removed it in C++17 (while preserving
it as a keyword for future usage).
On 13/11/2026 08:41, David Brown wrote:
On 12/11/2026 23:27, Tristan Wibberley wrote:
On 12/11/2026 19:44, Tristan Wibberley wrote:
On 06/11/2026 01:12, Lawrence DrCOOliveiro wrote:
On Thu, 5 Nov 2026 19:52:31 -0500, James Kuyper wrote:
For historical reasons, bitwise or (|) and bitwise and (&) are
exceptions. Unfortunately, correcting that mistake would break
backwards compatibility ...
The only real issue is that bitwise ops have lower priority than
comparisons, when they should be higher. If they were higher, then an >>>>> expression like
-a-a-a-a (bitval & mask) == desired_value
wouldnrCOt need parentheses.
Realistically, can anyone offer *any* real-world C code that
uses an expression that would be parenthesized like
-a-a-a-a a & (b == c)
bitwise ops are well used to do logic on 'booleans'
oh yeah, for C this is all "int" so I think I would only want to do it
with 2s-complement architectures. I think C++ is fine because they're
"bool" instead.
In C, the equality and relational operators evaluate to an "int" value
of either 0 or 1.-a They never result in any other value.
0 has two representations in 1s-complement, all zeros or all ones. I am worried about that when using bitwise operators to implement logic in
case a comparison yields an all-ones representation of 0. Do comparisons
and ! always produce the all-zeros representation in 1s-complement machines?
The only time an optimising
compiler actually follows the rules about what is and what is not
evaluated, is when there are side-effects that could potentially lead to
observable behaviour.
For sufficiently restrictive definitions of "observable".
Clocks and
voltage drops are observable. Voltage drops in particular can cause explosives to land in the wrong place when other systems don't get the current they need. If you can supply the current without dropping
voltage you still have more heat being produced. It all matters at the extremes.
The most sensible way to write your code - IMHO - is to use bitwise
operators only when you actually mean bitwise operations such as
masking.-a Use logical operators when you mean logical operations - "this
is true AND that is true" or "this is true OR that is true".-a And of
course, use logical operators if you need to rely on the short-circuit
evaluation or order of evaluation.
Using shortcutting when you don't require shortcutting has a meaningful effect on objective measures of the complexity of the system (as does
using an unspecified order with bitwise operators.
bitwise operators always evaluate both operands but in unspecified order.
logical operators sometimes evaluate only one operand but in specified
order when they evaluate both.
The types of failure that can be caused by that difference can matter.
Using the bitwise operators can cause usage of shared resources to vary across the domain.
Idempotency mitigates this and is advisable widely
anyway, so for techniques to avoid shared resources from existing
anyway.
The integration solutions for such problems are some of the
intuitive ones relied on when integrating independent active systems
anyway (ie, we already think about systems in terms of "the two effects happen, make sure your stuff works in case of whichever order").
One can
signal an effect threshold wrapping the logic in a trigger call and so
forth.
Using the logical operators can cause usage of private resources to vary across the domain. It remains a problem even when other good practices
have been applied.
It's not perfect to use bitwise, clearly, but the alternative complexity
of a configuration (order vs shortcut) is sometimes an opportune
reduction in complexity of a development process or asset lifetime.
And don't bother with the "register" keyword.-a Optimising compilers have
ignored that for decades, and C++ removed it in C++17 (while preserving
it as a keyword for future usage).
It ought to have been kept meaningful in C++ to mask operator& at least.
I recall it was at least as early as C++98 that it was noneffective, definitely I know it was before C++17 because I never used C++17.
On 13/11/2026 08:41, David Brown wrote:[...]
In C, the equality and relational operators evaluate to an "int" value
of either 0 or 1.-a They never result in any other value.
0 has two representations in 1s-complement, all zeros or all ones. I am worried about that when using bitwise operators to implement logic in
case a comparison yields an all-ones representation of 0. Do comparisons
and ! always produce the all-zeros representation in 1s-complement machines?
And don't bother with the "register" keyword.-a Optimising compilers have
ignored that for decades, and C++ removed it in C++17 (while preserving
it as a keyword for future usage).
It ought to have been kept meaningful in C++ to mask operator& at least.
I recall it was at least as early as C++98 that it was noneffective, definitely I know it was before C++17 because I never used C++17.
Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> writes:
On 13/11/2026 08:41, David Brown wrote:[...]
In C, the equality and relational operators evaluate to an "int" value
of either 0 or 1.-a They never result in any other value.
0 has two representations in 1s-complement, all zeros or all ones. I am
worried about that when using bitwise operators to implement logic in
case a comparison yields an all-ones representation of 0. Do comparisons
and ! always produce the all-zeros representation in 1s-complement machines?
C17 6.2.6.2p3,4:
So the equality and comparison operators never yield a negative zero.
And don't bother with the "register" keyword.-a Optimising compilers have >>> ignored that for decades, and C++ removed it in C++17 (while preserving
it as a keyword for future usage).
It ought to have been kept meaningful in C++ to mask operator& at least.
I recall it was at least as early as C++98 that it was noneffective,
definitely I know it was before C++17 because I never used C++17.
I've never had a need to disable unary &. Have you?
On 13/11/2026 16:27, Tristan Wibberley wrote:
On 13/11/2026 08:41, David Brown wrote:
On 12/11/2026 23:27, Tristan Wibberley wrote:
On 12/11/2026 19:44, Tristan Wibberley wrote:
On 06/11/2026 01:12, Lawrence DrCOOliveiro wrote:
There is no benefit in using bitwise operators when
the logical operators are appropriate - unless you count "confusing
readers" as a benefit.
The only time an optimising
compiler actually follows the rules about what is and what is not
evaluated, is when there are side-effects that could potentially lead to >>> observable behaviour.
For sufficiently restrictive definitions of "observable".
The C standards define "observable behaviour", and that is the
definition I use.
The most sensible way to write your code - IMHO - is to use bitwise
operators only when you actually mean bitwise operations such as
masking.
Using shortcutting when you don't require shortcutting has a meaningful
effect on objective measures of the complexity of the system (as does
using an unspecified order with bitwise operators.
What meaningful effect?-a The evaluation of an expression that does not affect C observable behaviour has /zero/ "meaningful effect" in C.
But do you understand what "evaluates" means here?
The types of failure that can be caused by that difference can matter.
Do you have an example in mind?-a That might make it easier to understand what you are talking about.
Using the bitwise operators can cause usage of shared resources to vary
across the domain.
I have no idea what you mean by this.
Idempotency mitigates this and is advisable widely
anyway, so for techniques to avoid shared resources from existing
anyway.
I have no idea what you mean by this.-a You might be using the word "idempotency" incorrectly.-a (An operation "op" is "idempotent" if and
only if "x op x == x" for all "x".)
The integration solutions for such problems are some of the
intuitive ones relied on when integrating independent active systems
anyway (ie, we already think about systems in terms of "the two effects
happen, make sure your stuff works in case of whichever order").
Are you trying to say that since the order of evaluation of the sub- expressions for most operators (including the bitwise ones) is not
specified, your code should not rely on any specific ordering?-a That is obviously true.
One can
signal an effect threshold wrapping the logic in a trigger call and so
forth.
Again, I have no idea what you are trying to say here.
Using the logical operators can cause usage of private resources to vary
across the domain. It remains a problem even when other good practices
have been applied.
You are going to have to give examples or explain better.
On 2026-11-06 00:35, Keith Thompson wrote:
James Kuyper <jameskuyper@alumni.caltech.edu> writes:I should have said "... one or more matched pairs of parentheses ...".
[...]
Otherwise, one or more parentheses
might solve the problem.
Technically correct (the best kind of correct), but *two* or more
parentheses are even better.
Am 10.11.2026 um 09:58 schrieb Fred. Zwarts:
Op 09.nov.2026 om 10:03 schreef Bonita Montero:
Am 06.11.2026 um 00:42 schrieb Lynn McGuire:
if (j1 * i1 < 1) {The latter one leads to more optimized code !
-a-a-a-a goto L463;
}
...
if ((j1 * i1) < 1) {
-a-a-a-a goto L463;
}
Really? Why?
It's faster the more braces you have.
On 06/11/2026 15:33, James Kuyper wrote:
On 2026-11-06 00:35, Keith Thompson wrote:
James Kuyper <jameskuyper@alumni.caltech.edu> writes:I should have said "... one or more matched pairs of parentheses ...".
[...]
Otherwise, one or more parentheses
might solve the problem.
Technically correct (the best kind of correct), but *two* or more
parentheses are even better.
You have clearly suffered the pedants more than one man should have toI am one of the worst pedants you're likely to meet. I cannot object to
bear. I feel for you.
On 2026-11-14 14:05, Tristan Wibberley wrote:
On 06/11/2026 15:33, James Kuyper wrote:
On 2026-11-06 00:35, Keith Thompson wrote:
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
[...]
Otherwise, one or more parentheses
might solve the problem.
Technically correct (the best kind of correct), but *two* or more
parentheses are even better.
I should have said "... one or more matched pairs of parentheses ...".
You have clearly suffered the pedants more than one man should have to
bear. I feel for you.
I am one of the worst pedants you're likely to meet. I cannot object to
such minor pedantry.
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
On 2026-11-14 14:05, Tristan Wibberley wrote:
On 06/11/2026 15:33, James Kuyper wrote:
On 2026-11-06 00:35, Keith Thompson wrote:
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
[...]
Otherwise, one or more parentheses >>>>>> might solve the problem.
Technically correct (the best kind of correct), but *two* or more
parentheses are even better.
I should have said "... one or more matched pairs of parentheses ...".
You have clearly suffered the pedants more than one man should have to
bear. I feel for you.
I am one of the worst pedants you're likely to meet. I cannot object to
such minor pedantry.
Pedants unite!
And my remark was intended mostly for humorous effect.
(Hoping this doesn't start a debate about whether it was funny.)
On 13/11/2026 16:49, David Brown wrote:
On 13/11/2026 16:27, Tristan Wibberley wrote:
On 13/11/2026 08:41, David Brown wrote:
On 12/11/2026 23:27, Tristan Wibberley wrote:
On 12/11/2026 19:44, Tristan Wibberley wrote:
On 06/11/2026 01:12, Lawrence DrCOOliveiro wrote:
There is no benefit in using bitwise operators when
the logical operators are appropriate - unless you count "confusing
readers" as a benefit.
That's definitely not true, being able to know both lhs and rhs are
evaluated regardless of the value of the other from just a glance at the
code is beneficial. Begin able to know that, when they're function
calls, side-effects of both will occur is beneficial.
The only time an optimising
compiler actually follows the rules about what is and what is not
evaluated, is when there are side-effects that could potentially lead to >>>> observable behaviour.
For sufficiently restrictive definitions of "observable".
The C standards define "observable behaviour", and that is the
definition I use.
Noted for this occasion, I will forget that you're using it in future.
The most sensible way to write your code - IMHO - is to use bitwise
operators only when you actually mean bitwise operations such as
masking.
For this purpose, they actually are logical too, one of the bits
nominated by the implementation has the required meaning. It is
commonplace to do this when two or more dimensions are involved, this is merely extending the practice down to when just one dimension is involved.
Using shortcutting when you don't require shortcutting has a meaningful
effect on objective measures of the complexity of the system (as does
using an unspecified order with bitwise operators.
What meaningful effect?-a The evaluation of an expression that does not
affect C observable behaviour has /zero/ "meaningful effect" in C.
Meaningful effect "on objective measures of the complexity of the
system". shortcutting increases cyclomatic complexity which is often considered a cost.
But do you understand what "evaluates" means here?
Yes. in great detail.
The types of failure that can be caused by that difference can matter.
Do you have an example in mind?-a That might make it easier to understand
what you are talking about.
Yes but I'm feeling pretty tired. You will know what kinds of problems
can occur in a system containing a C program among its constituents
based on orderings of effects or based on conditional effects.
Using the bitwise operators can cause usage of shared resources to vary
across the domain.
I have no idea what you mean by this.
Different cases of a function's inputs could make a resource that both operands manipulate change in ways that are described non-uniformly
across cases, extrapolation from test cases to all other cases to
predict compliance can be wrong.
Idempotency mitigates this and is advisable widely
anyway, so for techniques to avoid shared resources from existing
anyway.
I have no idea what you mean by this.-a You might be using the word
"idempotency" incorrectly.-a (An operation "op" is "idempotent" if and
only if "x op x == x" for all "x".)
I understand the term to be used slightly more broadly but only
slightly. What I had in mind is only irrelevantly different from your definition.
many classes of invalid programs caused by being affected by ordering
can be made valid by using idempotency in their side-effects.
Then I meant "also for techniques..." which are such a big group that
I'm not going to bother giving examples because this has started to feel
like a job interview which I do not want.
The integration solutions for such problems are some of the
intuitive ones relied on when integrating independent active systems
anyway (ie, we already think about systems in terms of "the two effects
happen, make sure your stuff works in case of whichever order").
Are you trying to say that since the order of evaluation of the sub-
expressions for most operators (including the bitwise ones) is not
specified, your code should not rely on any specific ordering?-a That is
obviously true.
I'm saying we make systems that do not rely on ordering all the time and
the management of a development process involving just more of the same
is easiest.
One can
signal an effect threshold wrapping the logic in a trigger call and so
forth.
Again, I have no idea what you are trying to say here.
One can call a finalisation function after the conditions have been
evaluated which delimits a segment of program addresses in which some
signal is permissibly invalid. That can include I/O so that external
signals are issued.
Using the logical operators can cause usage of private resources to vary >>> across the domain. It remains a problem even when other good practices
have been applied.
You are going to have to give examples or explain better.
Different cases of a function's inputs could make a resource that the
rhs manipulates change in ways that are described non-uniformly across
cases, extrapolation from test cases to all other cases to predict
compliance can be wrong.
Matters of ordering are experienced through systems at all scales and
are solved with a few practices all over all the systems, in particular, systems are very commonly composed of parts that act independently
except when explicitly excluding each other by signalling protocols (or
by a scheduler or broker). Matters of shortcutting are different so
those very common practices don't all apply helpfully, making
shortcutting, in my mind, a choice to make very cautiously.
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
On 2026-11-14 14:05, Tristan Wibberley wrote:
On 06/11/2026 15:33, James Kuyper wrote:
On 2026-11-06 00:35, Keith Thompson wrote:
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
[...]
Otherwise, one or more parentheses >>>>>> might solve the problem.
Technically correct (the best kind of correct), but *two* or more
parentheses are even better.
I should have said "... one or more matched pairs of parentheses ...".
You have clearly suffered the pedants more than one man should have to
bear. I feel for you.
I am one of the worst pedants you're likely to meet. I cannot object to
such minor pedantry.
Pedants unite!
And my remark was intended mostly for humorous effect. (Hoping
this doesn't start a debate about whether it was funny.)
On 2026-11-15 03:22, Keith Thompson wrote:
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
On 2026-11-14 14:05, Tristan Wibberley wrote:
On 06/11/2026 15:33, James Kuyper wrote:
On 2026-11-06 00:35, Keith Thompson wrote:You have clearly suffered the pedants more than one man should have to >>>> bear. I feel for you.
James Kuyper <jameskuyper@alumni.caltech.edu> writes:
[...]
-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a Otherwise, one or more parentheses
might solve the problem.
Technically correct (the best kind of correct), but *two* or more
parentheses are even better.
I should have said "... one or more matched pairs of parentheses ...". >>>>
I am one of the worst pedants you're likely to meet. I cannot object to
such minor pedantry.
:-)
Pedants unite!
Ped-ants un-ite.
Did it occur to you that "ped" is a Latin prefix for "foot", that
"ants" are insects with many feet, and "ite" in Latin means "go!",
and I wonder why there's the "un" prefix that negates "un-ite" as
"Don't go!". Probably a hidden request to not use "Go" as language
but rather focus on "C" here?!
And my remark was intended mostly for humorous effect.
Please abstain from all humorous statements! - Note: "We [...] do
not have a sense of humor we're aware of." (You know the quote!?)
(Hoping this doesn't start a debate about whether it was funny.)
Oops! - You failed in a way. - Oh, "a way"; we *go* on a way. -
I suspect a conspiracy to subvert the purpose of this newsgroup!
On 15/11/2026 04:28, Janis Papanagnou wrote:
Ped-ants un-ite.
Did it occur to you that "ped" is a Latin prefix for "foot", that
"ants" are insects with many feet, and "ite" in Latin means "go!",
and I wonder why there's the "un" prefix that negates "un-ite" as
"Don't go!". Probably a hidden request to not use "Go" as language
but rather focus on "C" here?!
I'm taking James' claim as a challenge!-a A /real/ pedant would know that "ped" is from the /Greek/ word for "child".-a The etymology of "pedant"
is an old word for "schoolmaster" or "teacher" (specifically of
children).-a :-)
[...] "We [...] do not have a sense of humor we're aware of." [...]
Is it from the USA airport security guard training manual?
(Yes, I know it is from a film, but I can't quite place it at the moment.)
[...]Doesn't it have to be hidden to be a conspiracy?-a [...]
I suspect a conspiracy to subvert the purpose of this newsgroup!
On 13/11/2026 23:21, Tristan Wibberley wrote:
On 13/11/2026 16:49, David Brown wrote:
On 13/11/2026 16:27, Tristan Wibberley wrote:
On 13/11/2026 08:41, David Brown wrote:
On 12/11/2026 23:27, Tristan Wibberley wrote:
On 12/11/2026 19:44, Tristan Wibberley wrote:
On 06/11/2026 01:12, Lawrence DrCOOliveiro wrote:
There is no benefit in using bitwise operators when
the logical operators are appropriate - unless you count "confusing
readers" as a benefit.
That's definitely not true, being able to know both lhs and rhs are
evaluated regardless of the value of the other from just a glance at the
code is beneficial. Begin able to know that, when they're function
calls, side-effects of both will occur is beneficial.
As I said, there is no benefit in using bitwise operators when logical operators are appropriate. If you are relying on the evaluation of "B"
in the expression "A op B", then using logical operators would not be appropriate.
But I think it could be considered bad style, and potentially confusing,
if you wrote "success = foo() & bar();" where these two functions
returned pass / fail indications and you used this formulation to say
that both had to be run, with "success" being the conjunction. It would
be more idiomatic, I think, to call them separately. With bitwise and
here, readers would wonder if you had really meant to use logical and.
The details of the rest of the code, the names of the functions, and so
on, would of course greatly influence how readers would interpret the
code. But my feeling is that when a reader sees at a glance the bitwise
and operator between two function calls, they would not immediately
conclude that you used bitwise and so that the rhs was also evaluated -
they would guess that you made a mistake in the code.
The only time an optimising
compiler actually follows the rules about what is and what is not
evaluated, is when there are side-effects that could potentially
lead to
observable behaviour.
For sufficiently restrictive definitions of "observable".
The C standards define "observable behaviour", and that is the
definition I use.
Noted for this occasion, I will forget that you're using it in future.
I can try and remember to make it clearer in the future. But since this
is comp.lang.c and comp.lang.c++, and "observable behaviour" is a very specific term from the standards that is critical to understanding the semantics of these languages, I think you should get used to the term.
The word "behaviour" on its own is likely to be used more generally.
The most sensible way to write your code - IMHO - is to use bitwise
operators only when you actually mean bitwise operations such as
masking.
For this purpose, they actually are logical too, one of the bits
nominated by the implementation has the required meaning. It is
commonplace to do this when two or more dimensions are involved, this is
merely extending the practice down to when just one dimension is
involved.
You can certainly use the bitwise operators to have the same effect
effect as the logical operators (apart from evaluation guarantees), in
the same way that you can write "x + x + x" instead of "x * 3" - using
the addition operator to do multiplication. In general, I don't think
it is a good idea, even though compilers will often generate identical
code. You would even get the same results replacing "&&" with "*", but
that would be even less of a good idea.
Using shortcutting when you don't require shortcutting has a meaningful >>>> effect on objective measures of the complexity of the system (as does
using an unspecified order with bitwise operators.
What meaningful effect? The evaluation of an expression that does not
affect C observable behaviour has /zero/ "meaningful effect" in C.
Meaningful effect "on objective measures of the complexity of the
system". shortcutting increases cyclomatic complexity which is often
considered a cost.
Okay, I can see that :
// success = foo() && bar()
bool success = foo();
if (success) {
success = bar();
}
// success = foo() & bar()
bool success_foo = foo();
bool success_bar = bar();
bool success = success_foo & success_bar;
Yes, the conditional increases the cyclomatic complexity of the code.
But while cyclomatic complexity can sometimes be a useful and measurable metric, I am not at all convinced that it is often a particularly useful
one except if you need to give an objective reason why a particular bad function is "clearly incomprehensible".
But do you understand what "evaluates" means here?
Yes. in great detail.
The types of failure that can be caused by that difference can matter.
Do you have an example in mind? That might make it easier to understand >>> what you are talking about.
Yes but I'm feeling pretty tired. You will know what kinds of problems
can occur in a system containing a C program among its constituents
based on orderings of effects or based on conditional effects.
Fair enough. It means that I am sticking to "foo() & bar()" examples,
which might not match what you are thinking about.
Note that when you write "foo() & bar()", where these are both function calls, you are guaranteed that either "far()" is evaluated first and
then "bar()" is evaluated, or vice-versa. You have no control over
their order of evaluation. And if these are not function calls, but are other kinds of sub-expressions (or perhaps macros), their evaluation can
be interleaved.
If you need to control the order of evaluation and side-effects, you
should do so with separate statements. Call "foo" first in one
statement, then call "bar".
Using the bitwise operators can cause usage of shared resources to vary >>>> across the domain.
I have no idea what you mean by this.
Different cases of a function's inputs could make a resource that both
operands manipulate change in ways that are described non-uniformly
across cases, extrapolation from test cases to all other cases to
predict compliance can be wrong.
I still fail to see a relevancy. If you can give an example, great. If
not, I will leave it.
Idempotency mitigates this and is advisable widely
anyway, so for techniques to avoid shared resources from existing
anyway.
I have no idea what you mean by this. You might be using the word
"idempotency" incorrectly. (An operation "op" is "idempotent" if and
only if "x op x == x" for all "x".)
I understand the term to be used slightly more broadly but only
slightly. What I had in mind is only irrelevantly different from your
definition.
Its definition can certainly be broadened beyond just binary operators,
but I agree that would not be relevant.
many classes of invalid programs caused by being affected by ordering
can be made valid by using idempotency in their side-effects.
For example :
bool initialised;
void initialise() {
// Do useful stuff
initialised = true;
}
bool foo() {
if (!initialised) initialise();
return do_foo();
}
bool bar() {
if (!initialised) initialise();
return do_bar();
}
Then it does not matter which of "foo" and "bar" is called first in
"foo() & bar()", because they are "idempotent" in ensuring that the initialisation is done correctly. Is this what you are talking about?
The "static initialisation order fiasco" is a real thing, and programs
have had bugs from getting this kind of thing wrong. But I can't see
its relevance in the choice of using bitwise & for logical operations.
Then I meant "also for techniques..." which are such a big group that
I'm not going to bother giving examples because this has started to feel
like a job interview which I do not want.
I am just trying to understand your perspective, that's all. There is
no job at the end of it, and no pressure for you to write more than you
want to. Discussing how and why people write code in different ways can teach us new ways to write code, or give better appreciation for why
people write or interpret code differently.
The integration solutions for such problems are some of the
intuitive ones relied on when integrating independent active systems
anyway (ie, we already think about systems in terms of "the two effects >>>> happen, make sure your stuff works in case of whichever order").
Are you trying to say that since the order of evaluation of the sub-
expressions for most operators (including the bitwise ones) is not
specified, your code should not rely on any specific ordering? That is
obviously true.
I'm saying we make systems that do not rely on ordering all the time and
the management of a development process involving just more of the same
is easiest.
One can
signal an effect threshold wrapping the logic in a trigger call and so >>>> forth.
Again, I have no idea what you are trying to say here.
One can call a finalisation function after the conditions have been
evaluated which delimits a segment of program addresses in which some
signal is permissibly invalid. That can include I/O so that external
signals are issued.
Using the logical operators can cause usage of private resources to
vary
across the domain. It remains a problem even when other good practices >>>> have been applied.
You are going to have to give examples or explain better.
Different cases of a function's inputs could make a resource that the
rhs manipulates change in ways that are described non-uniformly across
cases, extrapolation from test cases to all other cases to predict
compliance can be wrong.
Matters of ordering are experienced through systems at all scales and
are solved with a few practices all over all the systems, in particular,
systems are very commonly composed of parts that act independently
except when explicitly excluding each other by signalling protocols (or
by a scheduler or broker). Matters of shortcutting are different so
those very common practices don't all apply helpfully, making
shortcutting, in my mind, a choice to make very cautiously.
When you write code in C or C++, you control the order of observable behaviour (as defined by the standards). You don't control any other
order, you don't control any timing, and you don't control when the compiler-generated code does extra work, or skips work, if the work does
not influence observable behaviour.
You should not use && if you want the observable behaviour from the rhs regardless of the value of the lhs. That's not special about
shortcutting logical operators, that's just writing code that does what
you want it to do. Similarly, you should not use & for logical
conjunction if you /do/ want shortcutting semantics.
But IMHO you should not use bitwise & when your code is expressing a
logical intent - just as you should not use "int" when you mean "bool".
That is not directly a matter of code correctness, but it is a matter of
code style and unambiguous understanding from both readers and writers,
and thus a reduction of the risk of bugs.
It is also very common in coding standards to say that statements should
do one thing at a time. Such rules would ban "foo() & bar()" and also
"foo() && bar()" when both functions may have side-effects. Follow that rule, and there is no risk due to the unspecified order of evaluation,
nor any need to be concerned about "idempotency".
On 2026-11-16 09:50, David Brown wrote:
On 15/11/2026 04:28, Janis Papanagnou wrote:
Ped-ants un-ite.
Did it occur to you that "ped" is a Latin prefix for "foot", that
"ants" are insects with many feet, and "ite" in Latin means "go!",
and I wonder why there's the "un" prefix that negates "un-ite" as
"Don't go!". Probably a hidden request to not use "Go" as language
but rather focus on "C" here?!
I'm taking James' claim as a challenge! A /real/ pedant would know
that "ped" is from the /Greek/ word for "child". The etymology of
"pedant" is an old word for "schoolmaster" or "teacher" (specifically
of children). :-)
Ah, it serves me right.
What do I know about Greek. Latin is already demanding enough. :-)
[...] "We [...] do not have a sense of humor we're aware of." [...]
Is it from the USA airport security guard training manual?
(Ouch, yes. - Probably not only in the US. Strange people/processes.)
(Yes, I know it is from a film, but I can't quite place it at the
moment.)
Men in Black. (The agents visiting a lady frustrated by the police,
and Tommy Lee Jones saying that.)
[...]Doesn't it have to be hidden to be a conspiracy? [...]
I suspect a conspiracy to subvert the purpose of this newsgroup!
I thought it had been quite hidden and it got revealed?
Now, unrevealed, the presumed conspiracy theory became a "fact". ;-)
Janis
One way to read what your saying is "algebraizations" and
"arithmetizations", that's the act of interpreting models of
objects their matters of relation according to the matters of
relation of algebras and arithmetic.
On 2026-11-16 09:50, David Brown wrote:
On 15/11/2026 04:28, Janis Papanagnou wrote:
Ped-ants un-ite.
Did it occur to you that "ped" is a Latin prefix for "foot", that
"ants" are insects with many feet, and "ite" in Latin means "go!",
and I wonder why there's the "un" prefix that negates "un-ite" as
"Don't go!". Probably a hidden request to not use "Go" as language
but rather focus on "C" here?!
I'm taking James' claim as a challenge!-a A /real/ pedant would know
that "ped" is from the /Greek/ word for "child".-a The etymology of
"pedant" is an old word for "schoolmaster" or "teacher" (specifically
of children).-a :-)
Ah, it serves me right.
What do I know about Greek. Latin is already demanding enough. :-)
[...] "We [...] do not have a sense of humor we're aware of." [...]
Is it from the USA airport security guard training manual?
(Ouch, yes. - Probably not only in the US. Strange people/processes.)
(Yes, I know it is from a film, but I can't quite place it at the
moment.)
Men in Black. (The agents visiting a lady frustrated by the police,
and Tommy Lee Jones saying that.)
[...]Doesn't it have to be hidden to be a conspiracy?-a [...]
I suspect a conspiracy to subvert the purpose of this newsgroup!
I thought it had been quite hidden and it got revealed?
Now, unrevealed, the presumed conspiracy theory became a "fact". ;-)
On 16/11/2026 11:21, Ross Finlayson wrote:
No, that is not a way to read what I wrote. I wrote in English.
One way to read what your saying is "algebraizations" and
"arithmetizations", that's the act of interpreting models of
objects their matters of relation according to the matters of
relation of algebras and arithmetic.
Please find some way to write comprehensibly, without the waffling and rambling, and focusing on the point you are trying to make.
Maybe you could try this for a plan. Before hitting "send" on a post,
give the post to your favourite AI slopbot and ask it to generate a
single paragraph summary. If that summary does not match what you
wanted to say, you know you need to express your post differently. And
if it /does/ match what you want to say, just post that summary so that
other people don't need to wade through your original post.
On 11/16/2026 03:37 AM, David Brown wrote:
On 16/11/2026 11:21, Ross Finlayson wrote:
No, that is not a way to read what I wrote. I wrote in English.
One way to read what your saying is "algebraizations" and
"arithmetizations", that's the act of interpreting models of
objects their matters of relation according to the matters of
relation of algebras and arithmetic.
Please find some way to write comprehensibly, without the waffling and
rambling, and focusing on the point you are trying to make.
Maybe you could try this for a plan. Before hitting "send" on a post,
give the post to your favourite AI slopbot and ask it to generate a
single paragraph summary. If that summary does not match what you
wanted to say, you know you need to express your post differently. And
if it /does/ match what you want to say, just post that summary so that
other people don't need to wade through your original post.
I dispute your estimation of my command of English.
Wherever you got the impression that what I write
isn't perfectly grammatical, if long-winded and
for some a bit the too run-on the style, forget it.
Of course above where I wrote "your" for "you're",
that's intolerable.
Once I asked one of those "on-line grade estimators"
a sample of writing. This is where, for example,
editors of things like newspapers would be aware
of things like "news articles are written toa 6'th
grade reading level".
It said "Grade 26". Maybe it's the reading not
the writing the problem.
I will not insult your intelligence by insulting
your intelligence by insulting your intelligence.
On 11/16/2026 03:37 AM, David Brown wrote:
On 16/11/2026 11:21, Ross Finlayson wrote:
No, that is not a way to read what I wrote.-a I wrote in English.
One way to read what your saying is "algebraizations" and
"arithmetizations", that's the act of interpreting models of
objects their matters of relation according to the matters of
relation of algebras and arithmetic.
Please find some way to write comprehensibly, without the waffling and
rambling, and focusing on the point you are trying to make.
Maybe you could try this for a plan.-a Before hitting "send" on a post,
give the post to your favourite AI slopbot and ask it to generate a
single paragraph summary.-a If that summary does not match what you
wanted to say, you know you need to express your post differently.-a And
if it /does/ match what you want to say, just post that summary so that
other people don't need to wade through your original post.
I dispute your estimation of my command of English.
Wherever you got the impression that what I write
isn't perfectly grammatical, if long-winded and
for some a bit the too run-on the style, forget it.
Of course above where I wrote "your" for "you're",
that's intolerable.
[suggestions for writing improvement]
I dispute your estimation of my command of English.
On 16/11/2026 12:57, Ross Finlayson wrote:
On 11/16/2026 03:37 AM, David Brown wrote:
On 16/11/2026 11:21, Ross Finlayson wrote:
No, that is not a way to read what I wrote. I wrote in English.
One way to read what your saying is "algebraizations" and
"arithmetizations", that's the act of interpreting models of
objects their matters of relation according to the matters of
relation of algebras and arithmetic.
Please find some way to write comprehensibly, without the waffling and
rambling, and focusing on the point you are trying to make.
Maybe you could try this for a plan. Before hitting "send" on a post,
give the post to your favourite AI slopbot and ask it to generate a
single paragraph summary. If that summary does not match what you
wanted to say, you know you need to express your post differently. And
if it /does/ match what you want to say, just post that summary so that
other people don't need to wade through your original post.
I dispute your estimation of my command of English.
Wherever you got the impression that what I write
isn't perfectly grammatical, if long-winded and
for some a bit the too run-on the style, forget it.
Of course above where I wrote "your" for "you're",
that's intolerable.
Your grammar is imperfect, but not nearly bad enough to be an issue.
Real problems include your regular use of words and phrases in a way
that simply does not match their meaning. Run-on sentences are bad when
they are too frequent, but made much worse by your overuse of "filler"
words and phrases. Much of what you write would be more appropriate for
a politician giving a filibuster speech.
The root problem, I think, is that you have no focus in your writing.
There is an open conduct between your thoughts and the words you type.
Your thoughts wander, and - like everyone else - /you/ understand what
you are thinking about. But other people do not live in your head. If
you want people to understand what you are thinking about, you have to
write in a way that other people can understand it - not just throw your thoughts at a page randomly.
I believe you have things worth saying. That's why I am trying to
suggest how you can improve your communication skills. Many others just write your posts off as "gobbledegook" or ignore them entirely. (The
number of people that have given such feedback should be an indication
that the problem here is the writer, not the readers.)
This will, I think, be the last post I make directly to you (at least
for a while) - unless you specifically ask for something. If you
understand what I am trying to say, and appreciate that you have a
serious problem communicating, then you can do something about it. If
you don't think that is the case, then you will continue to write posts
that are mostly ignored because they are simply too much effort to read.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 56:53:42 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
4 files (9,632K bytes) |
| Messages: | 285,828 |