Home > Community > Forums > PCB SKILL > error in "if" statement

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: *

 error in "if" statement 

Last post Wed, Mar 12 2014 1:10 PM by Guye. 4 replies.
Started by Guye 04 Mar 2014 12:36 PM. Topic has 4 replies and 667 views
Page 1 of 1 (5 items)
Sort Posts:
  • Tue, Mar 4 2014 12:36 PM

    • Guye
    • Not Ranked
    • Joined on Mon, Aug 3 2009
    • Yokneam, Israel
    • Posts 9
    • Points 150
    error in "if" statement Reply

    Hi,

    the error is: E- *Error* if: too few arguments (at least 2 expected, 1 given) - (member(via_net net_list))

    code:

    net_list=list("VDD" "VSS")

    sel_via_dbid=axlGetSelSet();listing the selected via's

    foreach(via sel_via_dbid

    net_dbid=via->net

    via_net=net_dbid->name

    if(member(via_net net_list)) then

    println("net name is VDD or VSS")

    else

    println("net name is:%s" via_net)

    )

    what am i missing here? Thanks, Guy

    • Post Points: 20
  • Tue, Mar 4 2014 12:51 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 715
    • Points 15,510
    Re: error in "if" statement Reply

    You have a misplaced ).

    Try:

    net_list=list("VDD" "VSS")

    sel_via_dbid=axlGetSelSet();listing the selected via's

    foreach(via sel_via_dbid

    net_dbid=via->net

    via_net=net_dbid->name

    if(member(via_net net_list) then

    println("net name is VDD or VSS")

    else

    println("net name is:%s" via_net)

    )

    You should use an editor with bracket matching. I use UltraEdit. 

    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Mar 5 2014 4:12 AM

    • Guye
    • Not Ranked
    • Joined on Mon, Aug 3 2009
    • Yokneam, Israel
    • Posts 9
    • Points 150
    Re: error in "if" statement Reply
    thank you very much :)
    • Post Points: 20
  • Wed, Mar 12 2014 9:35 AM

    Re: error in "if" statement Reply

    NotePad++ is available for free and supports a good number of language highlighting.  Including SKILL. 

    • Post Points: 20
  • Wed, Mar 12 2014 1:10 PM

    • Guye
    • Not Ranked
    • Joined on Mon, Aug 3 2009
    • Yokneam, Israel
    • Posts 9
    • Points 150
    Re: error in "if" statement Reply
    Thanks for the editor recommendation. I'm using gVim and it has a Lisp & skill syntax highlight. but i guess its not perfect ...
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by Guye at 04 Mar 2014 12:36 PM. Topic has 4 replies.