🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1874

alternative forms of if

#1874
From: fir
Date: Thu, 26 Nov 2026 16:54
52 lines
2419 bytes
thinking on this i get to sema conclusion that maybe if should have more 
form like

a T{} F{} Z{} -1{}

this is becouse one could say else is misleading its maybe mofe
if ( something ) YES {} NO {}

not just else..else being accused of being misleading here

note in assembly when youre doing compares

(from ai

Common conditional jumps
Instruction	Condition
JE / JZ	Equal / zero
JNE / JNZ	Not equal / not zero
JC / JB	Carry / below (unsigned)
JNC / JAE	No carry / above or equal (unsigned)
JA	Above (unsigned)
JBE	Below or equal (unsigned)
JG	Greater (signed)
JGE	Greater or equal (signed)
JL	Less (signed)
JLE	Less or equal (signed)
JO	Overflow
JNO	No overflow
JS	Sign set
JNS	Sign not set
JP / JPE	Parity even
JNP / JPO	Parity odd
)


so if you do

a T{} F{} Z{} C{}

you could use more conditions than just else

T being for true here F for false Z for zero NZ for non zero C for carry etc

you could also gave immediate values this extending if to simple switch

a T{} 2{} 9{}

gets in if a is true and gets in if 2 or 9

obviously those letters look weird but that is only illustration of some 
idea that something wronng may be with else..else may be mistake
Technical Details
Message-ID: <11e9o7d$s3ej$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: fir <profesor.fir@gmail.com>
Newsgroups: comp.lang.c
Subject: alternative forms of if
Date: Thu, 26 Nov 2026 17:54:04 +0100
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <11e9o7d$s3ej$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 26 Nov 2026 16:54:05 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="921043"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/lq5Q2VELAZHf2elVC6Gxb6fwurCPeMqM="; posting-host="3e78a52f82bf0b5f9f467f865e9c0f0c"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:v9ichnhe/yFboqLvGrxN+cvWSi0= sha256:hLoVGWyqmzMUXRCB1B2eI0LOXDxCkaeRNZPxiItV1VI=
	sha1:2RyyJHtyInmbQe0A2hEXQErO/WI= sha256:0CJQQArQs1a0CH+NbjiOc74V9jWf2xPPvFg4cGqsTio=
X-Mozilla-News-Host: news://news.eternal-september.org:119