Home > Community > Forums > Custom IC SKILL > Control flow when a return from a function is nil

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Control flow when a return from a function is nil 

Last post Mon, Mar 31 2014 11:19 AM by Andrew Beckett. 1 replies.
Started by jsaenznoval 31 Mar 2014 11:01 AM. Topic has 1 replies and 463 views
Page 1 of 1 (2 items)
Sort Posts:
  • Mon, Mar 31 2014 11:01 AM

    Control flow when a return from a function is nil Reply

     Hi everyone,

    I want to determine when the return for any function is nil using a control structure (i.e. if operator) in SKILL. I mean:

    if ( return(function(a,b,...,c))=nil

    ...

    )

     Any suggestions or solutions?

    Filed under: , ,
    • Post Points: 20
  • Mon, Mar 31 2014 11:19 AM

    Re: Control flow when a return from a function is nil Reply

    if(!function(a b c) then ...)

    or you could use the fractionally less efficient:

    if(function(a b c)==nil then ...)

    I'm sure this is in the SKILL Language User Guide. Since everything in SKILL is a function, everything has a return value.

    Regards,

    Andrew 

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by jsaenznoval at 31 Mar 2014 11:01 AM. Topic has 1 replies.