sady this plan of using | & failed becouse its said that here for example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
On 2026-10-22, Scott Lurndal <[email protected]> wrote:
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for example >>>
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
Problem is fir said "in case of |"; i.e. "if the operator | is
substituted for || in the above expression".
It's hard to spot things like this in the broken/loose english with low punctuation and capitalization.
A token substitution in the syntax requiring us to edit, recompile and redeploy the program image is not exactly a "case"; we normally
don't talk about it that way, let alone as an apparently subordinate condition to a run time value like target == -1.
"If we change || to | in the above, and then hit the value target == -1
at run-time, then bag[target] is still evaluated, with the out-of-bounds target index."
if(a) if (b) if(c) if (d) {}
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
On 22/10/2026 21:40, Scott Lurndal wrote:
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for
example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
You missed the point. || and && is ugly and for common, stupid people. Creative programmers like Fir need to be able to use whatever syntax
they like at the time, and the compiler should know what they mean - the compiler should /know/ that when Fir writes |, he means ||. It should
be able to tell he means logical or, not bitwise or, and figure out
which order the expressions should be evaluated regardless of how he
writes them.
Anything else is just a critical flaw in C.
David Brown pisze:
On 22/10/2026 21:40, Scott Lurndal wrote:
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for
example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
You missed the point. || and && is ugly and for common, stupid
people. Creative programmers like Fir need to be able to use whatever
syntax they like at the time, and the compiler should know what they
mean - the compiler should /know/ that when Fir writes |, he means
||. It should be able to tell he means logical or, not bitwise or,
and figure out which order the expressions should be evaluated
regardless of how he writes them.
you think so? you shoul better cut the bullshit
this is practice btw not much wise people do - they are unable tu
understand things so they replace it with some bulshit of their own production and then answer to their own bulshit - its quite _common_ practice
Anything else is just a critical flaw in C.
fir pisze:
David Brown pisze:
On 22/10/2026 21:40, Scott Lurndal wrote:
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for
example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {} >>>>>
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
You missed the point. || and && is ugly and for common, stupid
people. Creative programmers like Fir need to be able to use whatever
syntax they like at the time, and the compiler should know what they
mean - the compiler should /know/ that when Fir writes |, he means
||. It should be able to tell he means logical or, not bitwise or,
and figure out which order the expressions should be evaluated
regardless of how he writes them.
you think so? you shoul better cut the bullshit
this is practice btw not much wise people do - they are unable tu
understand things so they replace it with some bulshit of their own
production and then answer to their own bulshit - its quite _common_
practice
ofc i get used to it but if they do that - they should do that on their
own, dont mix it up with me: bulshit of your production is yours not
mine, also bulshit mental degrading ''ways' are of their own not mine
Anything else is just a critical flaw in C.
On 23/10/2026 09:51, fir wrote:
<snip rubbish>
When you post rubbish, you get rubbish responses. When you post
something interesting and C related, you will (sometimes) get
interesting responses - mostly because people think that there might be
more readers that could be interested.
Get over your pettiness and narcissism. No one cares what mood you are
in, or what you like or don't like. Most people ignore your posts
entirely because of the continuous meaningless streams of line noise you write. As long as you post like a spoiled child, you can expect to be treated like one.
But you do, sometimes, post interesting C questions that can lead to interesting discussions. Keep making these.
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
[email protected] (Scott Lurndal) wrote:
fir <[email protected]> writes:
sady this plan of using | & failed becouse its said that here for
example
if(target<0 ||target>=bag_max ||!bag[target].enabled) {}
if target is -1 in case of | the last one will be evalueated too
and it may be segfault
If the first test is true, the remaining tests will not be
executed.
If you knew C, you'd have known that.
I prefer the visibility of ?: to the implicitness of || &&
I prefer the visibility of ?: to the implicitness of || &&
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,142 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 135:28:22 |
| Calls: | 14,707 |
| Calls today: | 1 |
| Files: | 186,498 |
| D/L today: |
1,117 files (343M bytes) |
| Messages: | 2,552,863 |