Like Tree3Likes

how to select on the valid listview items?

This is a discussion on how to select on the valid listview items? within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Subsonics What is extremely poor, redundant etc. will vary depending on who you ask. Boolean algebra is ...

  1. #16
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by Subsonics View Post
    What is extremely poor, redundant etc. will vary depending on who you ask.
    Boolean algebra is extremely well-defined, and you will find it is possible to mathematically prove what is redundant and what is not.

    Fortunately, writing code is a science, more than it is an art.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  2. #17
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    Quote Originally Posted by Neo1 View Post
    Boolean algebra is extremely well-defined, and you will find it is possible to mathematically prove what is redundant and what is not.
    So what, C is not boolean algebra. What about descriptive variable and function names, or comments. Redundant?
    Last edited by Subsonics; 05-06-2012 at 12:03 PM.

  3. #18
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by Subsonics View Post
    So what, C is not boolean algebra. What about descriptive variable and function names, or comments. Redundant?
    Hey man, you're the one defending the use of an extra comparison for purposes of styling. I'm all for descriptive names. Anything else would be wrong.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  4. #19
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    Quote Originally Posted by Neo1 View Post
    Hey man, you're the one defending the use of an extra comparison for purposes of styling. I'm all for descriptive names. Anything else would be wrong.
    Writing out "== true" does not result in a extra comparison. The comparison is made anyway but implicitly.

  5. #20
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by Subsonics View Post
    Writing out "== true" does not result in a extra comparison. The comparison is made anyway but implicitly.
    Yes, the if-statement obviously means checking if the expression equals true, if you then put "== true" in the expression, you're doing an extra comparison. The compiler might do away with your redundant comparison, but then we don't want to rely on the compiler to fix our mess now do we?
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  6. #21
    Registered User
    Join Date
    Oct 2006
    Posts
    2,348
    how is any of this related to the OP's question?

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. keeping track of listview items
    By Bleech in forum Windows Programming
    Replies: 0
    Last Post: 08-31-2006, 09:11 PM
  2. questions regarding listview items
    By Bleech in forum Windows Programming
    Replies: 7
    Last Post: 08-26-2006, 02:26 PM
  3. Moving items in a ListView
    By Cactus_Hugger in forum Windows Programming
    Replies: 1
    Last Post: 01-18-2006, 08:40 PM
  4. ListView Items
    By Smoose777 in forum C# Programming
    Replies: 1
    Last Post: 06-21-2003, 12:10 PM
  5. Selected Items in a ListView
    By Lowas in forum Windows Programming
    Replies: 12
    Last Post: 09-01-2001, 07:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21