Jump to content

Programs that affect their own starting conditions


87squirrels

Recommended Posts

I know I've seen this posted somewhere, but now that I've run into it, can't find it...

 

I have two cases where the execution of a program changes one of the conditions required for the program to run, which causes the program to terminante prematurely.

 

The simple example is a program that I want to run if the garage door is opened and the driveway lights are not already on. Once the lights are turned on, the program terminates (and I want it to wait 10 minutes, then turn them off...). How can I decouple the program from the original conditions?

 

thanks,

-tom

Link to comment

87squirrels

 

That is correct. You will find lots of good information on Program execution in the UDI Wiki. The following is an excerpt from that Wiki ....

 

Statement Execution Order

 

Within the Then or Else clause of a program, statements are executed from top to bottom in the order in which they occur. When a statement calls another program, the called program begins executing, and the calling program immediately continues execution with the next statement in sequence--it does not wait for the called program to complete before continuing.

 

Lee

Link to comment

Archived

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


×
×
  • Create New...