Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_IIF limits two questions
#19
(05-14-2025, 12:56 PM)CharlieJV Wrote: Nested _IIF functions can get hard to read.
I would rewrite 

Exactly my point - in QB64PE, as with Excel, you can simply format it better to make it readable.
(The same is true for any command, not just IIF. I see a ton of code posted on here with multiple commands on one line done for convenience, where a simple line break + indenting makes it a lot easier to follow.)

(05-14-2025, 12:56 PM)CharlieJV Wrote: That said, I still prefer nested _IFF's than nested IF-THEN-ELSE structure because:

The IF-THEN-ELSE structure really requires me to read the whole thing to figure out what it is doing.

The single assignment statement with nested _IIF's: I know as soon as I read "NoteName$ =" that I'm dealing with an assignment statement that will assign some value to NoteName$. 

I've found the same thing - using IIF to neatly wrap up logic makes code easier to understand.

(05-14-2025, 12:56 PM)CharlieJV Wrote: Yeah, I don't have much love for Waldo ...)

Sit down, Waldo!
Tongue
Poor Waldo!
LoL
Reply


Messages In This Thread
_IIF limits two questions - by doppler - 12-20-2024, 07:06 PM
RE: _IIF limits two questions - by Petr - 12-20-2024, 08:03 PM
RE: _IIF limits two questions - by bplus - 12-20-2024, 09:07 PM
RE: _IIF limits two questions - by doppler - 12-21-2024, 02:00 AM
RE: _IIF limits two questions - by Pete - 12-20-2024, 11:44 PM
RE: _IIF limits two questions - by Pete - 12-21-2024, 12:02 AM
RE: _IIF limits two questions - by madscijr - 12-22-2024, 08:49 PM
RE: _IIF limits two questions - by bplus - 12-21-2024, 02:56 AM
RE: _IIF limits two questions - by a740g - 12-23-2024, 01:15 AM
RE: _IIF limits two questions - by madscijr - 12-23-2024, 03:53 AM
RE: _IIF limits two questions - by NakedApe - 01-20-2025, 01:19 AM
RE: _IIF limits two questions - by OldMoses - 05-13-2025, 05:11 PM
RE: _IIF limits two questions - by a740g - 05-13-2025, 10:51 PM
RE: _IIF limits two questions - by OldMoses - 05-13-2025, 11:38 PM
RE: _IIF limits two questions - by madscijr - 05-13-2025, 11:48 PM
RE: _IIF limits two questions - by SMcNeill - 05-13-2025, 11:55 PM
RE: _IIF limits two questions - by madscijr - 05-14-2025, 05:31 AM
RE: _IIF limits two questions - by CharlieJV - 05-14-2025, 12:56 PM
RE: _IIF limits two questions - by madscijr - 05-14-2025, 04:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What limits you? Unseen Machine 9 1,017 09-05-2025, 01:32 AM
Last Post: madscijr
  Half baked pipe dream questions - hardware and os Parkland 9 1,329 05-23-2025, 03:00 PM
Last Post: madscijr
  IDE suggestions / editor questions madscijr 14 2,351 05-01-2025, 12:56 PM
Last Post: madscijr
  Questions about INSTR Circlotron 7 1,030 04-27-2025, 03:12 PM
Last Post: mdijkens
  Just a Few Questions TarotRedhand 15 2,864 09-11-2023, 12:10 PM
Last Post: DSMan195276

Forum Jump:


Users browsing this thread: 1 Guest(s)