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

 For loop 

Last post Wed, Dec 16 2009 7:31 AM by sprinter. 4 replies.
Started by sprinter 15 Dec 2009 10:00 AM. Topic has 4 replies and 2944 views
Page 1 of 1 (5 items)
Sort Posts:
  • Tue, Dec 15 2009 10:00 AM

    • sprinter
    • Top 500 Contributor
    • Joined on Tue, Sep 29 2009
    • Posts 17
    • Points 310
    For loop Reply

    Hi,

     The 'for' loop increments in steps of 1. Is there a way to increment or decrement with a non-unity step?

    If I've a list of values to evaluate an BLOCKED EXPRESSION then 'foreach' is used but I couldn't find something for a range of values & with an arbritrary step size. Any comments?

    Thanks,

    Adil.

    • Post Points: 20
  • Tue, Dec 15 2009 1:02 PM

    Re: For loop Reply

    You could use the SKILL++ do() function, or simply use a while loop:

    i=0
    while(i<20
      println(i)
      i=i+2
    )

    Or look at solution 11025352 on support.cadence.com - this is one I wrote on "Understanding SKILL macros". There's a macro on implementing a C-like for loop.

    Regards,

    Andrew.

     

    • Post Points: 20
  • Tue, Dec 15 2009 2:21 PM

    • sprinter
    • Top 500 Contributor
    • Joined on Tue, Sep 29 2009
    • Posts 17
    • Points 310
    Re: For loop Reply

    Thanks a lot.

    The note on the macro is quite useful for new users like me.

    On a different subject, I'm wondering what's the best way to debug a SKILL code? I mean is there a tool which could be used for the editor. Right now I"m relying on the error messages I see in my CIW.

     

    Adil.

    • Post Points: 20
  • Wed, Dec 16 2009 2:04 AM

    Re: For loop Reply

    Adil,

    If using IC613/IC614 you have Tools->SKILL Development Environment (New) which is a GUI based tool which allows you to place breakpoints on lines in the code, trap errors, trace variables and so on.

    You also have the older Tools->SKILL Development menu which brings up the toolbox which gives access to a debugger - again, it can intercept errors and put breakpoints at the beginning or end of functions.This is also in older releases.

    For more info look in  <instdir>/doc/skhelp/skhelp.pdf and <instdir>/doc/skdevref/skdevref.pdf

    Note that this is a licensed tool - it requires product 900 (SKILL Development Environment).

    Regards,

    Andrew.

    • Post Points: 20
  • Wed, Dec 16 2009 7:31 AM

    • sprinter
    • Top 500 Contributor
    • Joined on Tue, Sep 29 2009
    • Posts 17
    • Points 310
    Re: For loop Reply

    Thanks once again for the info on the development tool - sounds very useful indeed. I checked the list of products we've currently & unfortunately this is not available.

     

    Best regards,

    Adil.

     

    Andrew Beckett:

    Adil,

    If using IC613/IC614 you have Tools->SKILL Development Environment (New) which is a GUI based tool which allows you to place breakpoints on lines in the code, trap errors, trace variables and so on.

    You also have the older Tools->SKILL Development menu which brings up the toolbox which gives access to a debugger - again, it can intercept errors and put breakpoints at the beginning or end of functions.This is also in older releases.

    For more info look in  <instdir>/doc/skhelp/skhelp.pdf and <instdir>/doc/skdevref/skdevref.pdf

    Note that this is a licensed tool - it requires product 900 (SKILL Development Environment).

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by sprinter at 15 Dec 2009 10:00 AM. Topic has 4 replies.