Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > Cadence > Re: updating th...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 3974 of 4210
Post > Topic >>

Re: updating the last element in a skill list

by nour <nour.laouini@[EMAIL PROTECTED] > Apr 26, 2008 at 02:40 AM

On Apr 25, 8:47=A0pm, Jean-Marc Bourguet <j...@[EMAIL PROTECTED]
> wrote:
> nour <nour.laou...@[EMAIL PROTECTED]
> writes:
> > hello,
>
> > I have a problem:
>
> > I want to update the last element in a skill list by incrementing it ,
> > for example I have the following list: =A0 =A0list=3D'(4 6) and I want
t=
o
> > transform it to this one =A0list=3D'(4 7).
>
> > There is a skill fonction which can do it: rplacd(name_liste
> > new_value) but it works only when I give the exact new_value, for
> > example i must tape
> > =A0rplacd( list '(7))
>
> > Please help me because i must use it in a "for" fonction so the
> > incrementation must happen automatically ....
>
> > I've tried this but it didn't work:
>
> > y=3Dnth( 1 list)+1
> > rplacd( list =A0'(y))
>
> > it generate the following list: =A0 (4 y)
>
> > thanks a lot for the one who will help me
>
> (defun addtolast (l inc)
> =A0 =A0(setcar (last l) (plus (last l) inc)))
>
> --
> Jean-Marc- Hide quoted text -
>
> - Show quoted text -

thanks for everybody who had helped me.....
 




 5 Posts in Topic:
updating the last element in a skill list
nour <nour.laouini@[EM  2008-04-25 10:51:45 
Re: updating the last element in a skill list
Jean-Marc Bourguet <jm  2008-04-25 20:47:56 
Re: updating the last element in a skill list
pxhxz@[EMAIL PROTECTED]   2008-04-25 14:25:41 
Re: updating the last element in a skill list
pxhxz@[EMAIL PROTECTED]   2008-04-25 14:34:03 
Re: updating the last element in a skill list
nour <nour.laouini@[EM  2008-04-26 02:40:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 23:44:41 CDT 2008.