Jump to content

Passing Parameters


KSchex

Recommended Posts

Posted

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....

Posted

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

  • Like 1
Posted

Thanks all....I was hoping I maybe missed something that would make passing and testing parameters simpler.

  • Like 1
Posted

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.

  • Like 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...