MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: a list as an option

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67198] Re: [mg67150] a list as an option
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 11 Jun 2006 23:08:07 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Options[f]={opt->1,pars->{a,b,c}};

SetOptions[f,pars->ReplacePart[pars/.Options[f],d,1]];

Options[f]

{opt -> 1, pars -> {d, b, c}}


Bob Hanlon

---- Akane Tendo <akane at netvisao.pt> wrote: 
> Hello,
> 
> If I have a function f with options like:
> Options[f]=[...,{pars->{a,b,c}}]
> How can I change just one of 'pars' options ('a', 'b' or 'c')?
> I tried to change, for example, 'a' to 'd' like this:
> SetOptions[f,pars[[1]]->d]
> But it didn't work.
> I also tried to access the option:
> Options[f,pars]
> And the result is: {}
> Does anyone know what am I doing wrong or if it's not possible at all to 
> have a list as an option?
> 
> Thank you!! 
> 
> 

--

Bob Hanlon
hanlonr at cox.net



  • Prev by Date: Re: List manipulation question
  • Next by Date: Re: Check[] vs Off[] ?
  • Previous by thread: a list as an option
  • Next by thread: RE: a list as an option