Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 07-17-2014, 01:47 PM   #11
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Visual logic help

Quote:
Originally Posted by megan1989 View Post
Alrightly then, it looks like that is going to work just fine. As for the exceptions like 11,12 and 13 I think I am going to input a IF statement using the OR before the Number MOD 10 with an EXIT loop to account for those numbers. It will look something like this

(Number <13) OR (Number >11) etc for all the number that are like that. Thank you so much it really helped me understand the visual logic program better
Sounds good, but don't you want an AND there instead? An OR will presumably match all numbers less than 13 OR greater than 11, which is - well, all numbers
__________________

__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 07-17-2014, 02:57 PM   #12
Baseband Member
 
Join Date: Jul 2014
Location: USA
Posts: 29
Default Re: Visual logic help

I would except that if you use AND, it only remains true if all conditions are true and I'm only entering one number at a time so I don't think that would work for what I am doing. The OR will remain true if at least one condition is true, so that is why I am using the OR. I will try the AND, but I am skeptical if that will work for what I am doing. Yes, that last part is correct, after I noticed that I changed the signs to equals and it is now working perfectly! Yay
__________________

megan1989 is offline   Reply With Quote
Old 07-17-2014, 05:08 PM   #13
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Visual logic help

Quote:
Originally Posted by megan1989 View Post
The OR will remain true if at least one condition is true, so that is why I am using the OR.
Let me phrase it another way - can you give me any value of x where:

(x<13) OR (x>11)

...evaluates to false?
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 07-17-2014, 10:19 PM   #14
Baseband Member
 
Join Date: Jul 2014
Location: USA
Posts: 29
Default Re: Visual logic help

Got it, that makes a lot more sense to use the AND, not OR, as that never gave me false with the OR operator, thank you.
__________________

megan1989 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 03:36 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0