ThePentiumGuy Posted August 12, 2003 Posted August 12, 2003 If you say: if not(a or b) Then end if logically, this statement would be, if not A and not B Then End if but, contradictorily, wouldnt that turn into if not A and B Then End If so basically, woundnt the Or change to an And when u remove the parenthesese You may think im weird, but if you realy look into this logically, it would change..(or maybe im wrong) but my other question is, how would the compiler interpret it as? thanks, The Pentium Guy Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Moderators Robby Posted August 12, 2003 Moderators Posted August 12, 2003 Hopefully A and B are both Boolean type, because Option Strict would complain. Quote Visit...Bassic Software
Leaders dynamic_sysop Posted August 12, 2003 Leaders Posted August 12, 2003 if you picture a Boolean then this is what's happening... first case: '/// if neither of the Booleans ( A and B ) are True If Not A And B Then '///do something because both are False End If in the second case: '/// if either a is False , or b is False If Not(a Or b) Then '///do something because either a or b are False End If hope it helps clear things a bit. Quote
ThePentiumGuy Posted August 13, 2003 Author Posted August 13, 2003 Hopefully A and B are both Boolean type, because Option Strict would complain. they are booleans. thankks dynamic_soup that did clear things up. So basically, when u removed the parenthesees, the Or changed to an And :) Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Moderators Robby Posted August 14, 2003 Moderators Posted August 14, 2003 When you remove the () it is thae same as ... If Not a Or Not b Then Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.