Home > Community > Forums > PCB SKILL > Modifying elements in a list

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

 Modifying elements in a list 

Last post Thu, Sep 18 2008 12:53 PM by bulldog. 2 replies.
Started by bulldog 18 Sep 2008 06:23 AM. Topic has 2 replies and 2179 views
Page 1 of 1 (3 items)
Sort Posts:
  • Thu, Sep 18 2008 6:23 AM

    • bulldog
    • Top 150 Contributor
    • Joined on Thu, Jul 17 2008
    • Cleveland, OH
    • Posts 51
    • Points 720
    Modifying elements in a list Reply

    I want to write a routine to pick an initial point (axlEnterPoint) for text and incrementally subtract 100 mils from the "Y" coordinate in the list returned for each subsequent line of text to be entered.  The question is how do I read the coordinate data within the list and how can I modify it for the next line of text?

    • Post Points: 20
  • Thu, Sep 18 2008 12:35 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 719
    • Points 15,575
    Re: Modifying elements in a list Reply
    Use cadr to get the y coordinate.
    eg:
    pt = axlEnterPoint()
    x = car(pt)
    y = cadr(pt)
    y2 = y - 100.0
    sprintf(nil, "x: %2.1f y: %2.1f", x, y2)

    Cheers, Dave
    Dave Elder, Tait Communications
    • Post Points: 20
  • Thu, Sep 18 2008 12:53 PM

    • bulldog
    • Top 150 Contributor
    • Joined on Thu, Jul 17 2008
    • Cleveland, OH
    • Posts 51
    • Points 720
    Re: Modifying elements in a list Reply

    Thanks for pointing me in the right direction.

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by bulldog at 18 Sep 2008 06:23 AM. Topic has 2 replies.