Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,203 members, 7,953,744 topics. Date: Friday, 20 September 2024 at 02:43 AM |
Nairaland Forum / Science/Technology / Programming / Why Programmers Don't USE IFF Statements (369 Views)
Why Programmers Are Single / Dear Programmers - Don't Fall For This Scam [pictures] / Is It True That Programmers Don't Have Time For Themselves Or Family? (2) (3) (4)
(1) (Reply)
Why Programmers Don't USE IFF Statements by AkandeJoseph99(m): 1:43am On Jan 29, 2021 |
Somebody asked this question, I just thought I should post the answer on NL Why don't programmers use IFF statements? The easy answer is we do We just spell it “IF.” The more complex answer: IFF is a mathematical term used in theorem proving. It’s not a “flow control” construct. So if a mathematician writes: “x = y iff a = b”, they mean… if a = b, then x = y, AND, if a != b, then x != y If a programmer writes: “IF (a == b) { x = y}” then they mean something very different. They mean: If a = b, then set the value of x to the value of y If a != b, then do nothing, leave the value of x unchanged In terms of IF vs IFF, that’s basically the same logic as the IFF version… which is why I wrote the “easy answer” they way I did. The most complex answer: There are a tiny number of languages in which you can use IFF. They are languages like OBJ3, which is used for theorem proving. Unless you are a mathematician you are unlikely ever to come across them. |
Re: Why Programmers Don't USE IFF Statements by Nobody: 10:51am On Jan 29, 2021 |
Eh? It's not just part of the syntax for god's sake. |
(1) (Reply)
Please Is University Degrees Compulsory Before I Learn Programing / Embedded System Components: Where To Purchase / Python Dev Needed
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 5 |