Jump to content

Integer Variables


jmed999

Recommended Posts

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!

Link to comment

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.

Link to comment
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).

Link to comment
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.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...