Jump to content

Passing Parameters


KSchex

Recommended Posts

Has anybody figured a way to call a program with an attached parameter such as like a function call;  function(parameter)?  This would make annunciating various situations a lot cleaner with a lot less If than elses.  Thanks....

Link to comment

That is more typical of an inline code style language. ISY is an event based trigger language.

 

You can write programs to run based on variable value changes or just set them and pick up the value in the subroutine as kingwr posted above, or both.

 

A variable being set to a value can not only trigger one of hundreds of programs to run based on the value you set the State variable to, but every one of them can use the variable and modify it as per global variable rules elsewhere.

 

Sent from my SGH-I257M using Tapatalk

Link to comment

All variables are global, so there is no passing.  If you really want to get a sense of how the ISY thinks, read some of the old programming guides from before variables were implemented.  Treating every action as a nested program with state machine logic is fascinating.  I still have not figured out the practical use of some things like conditional logic on folders.

Link to comment

Archived

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


×
×
  • Create New...