jmed999 Posted April 14, 2013 Posted April 14, 2013 I just started using variables. I have created 4 integer variables and I think I need to make them state variables so that when they change it will trigger the programs they are part of. That leads me to the question of when is an integer variable more appropriate in a program? I can't think of an example of when I would ant a variable as part of a program but not want it to trigger the program. I think some simple examples would help. Anyone know of a few simple examples of when an integer variable would be better in a program? What about folder conditions? Any examples of when an integer variable would be better when used as folder conditions? Thanks for the help!
oberkc Posted April 14, 2013 Posted April 14, 2013 Have you checked out the entire forum on "variables"? Check here: viewforum.php?f=68 As for me, I use a variable as a condition for whether I run a motion program. If I turn on a light manually, this sets a variable that keeps my motion sensor program for running. If it were the type of variable where the variable itself triggered the program, then it would trigger the timer each time manually turned it on. This is NOT what I want.
jmed999 Posted April 14, 2013 Author Posted April 14, 2013 Have you checked out the entire forum on "variables"? Check here: viewforum.php?f=68 As for me, I use a variable as a condition for whether I run a motion program. If I turn on a light manually, this sets a variable that keeps my motion sensor program for running. If it were the type of variable where the variable itself triggered the program, then it would trigger the timer each time manually turned it on. This is NOT what I want. Yeah, I look at that forum but didn't see the answer to my question. Not much traffic there either. Thanks for the help! I'm still not sure why a variable to triggering a program would be a bad thing (ie. integer variable).
oberkc Posted April 15, 2013 Posted April 15, 2013 I'm still not sure why a variable to triggering a program would be a bad thing Well, for my purposes, I have really needed no variables of any kind. I have tried a few examples, but could have accomplished the same thing without them. Others, however, have made extensive use of them to solve problems that cannot otherwise be accomplished. As a minimum, they offer flexibility and options. Perhaps you will never need variables or that your needs are simple like mine. In your case, it may make no difference whether they trigger or not.
Recommended Posts