MathGroup Archive 2007

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

Search the Archive

Re: Re: Fuction definition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73721] Re: [mg73683] Re: [mg73635] Fuction definition
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sun, 25 Feb 2007 04:42:49 -0500 (EST)
  • References: <200702230942.EAA17911@smc.vnet.net>

That is the best definition, by far, and should be in the
documentation -- with proper credit to Janos. [ :-) ]

On a more serious note, I don't know if I am correct, but I think of
SetDelayed[lhs,rhs] as Set[lhs,Unevaluated@rhs]



On 2/24/07, J=E1nos <janos.lobb at yale.edu> wrote:
>
> On Feb 23, 2007, at 4:42 AM, bar at ANTYSPAM.ap.krakow.pl wrote:
>
> > Hi
> >
> > When I try :
> > ------------------
> > p = 1;
> > f1[x_] := p Sin[Pi x];
> > p = 2;
> > f2[x_] := p Sin[Pi x];
> >
> > f1[0.5]
> > f2[0.5]
> >
> > Out[26]=2.
> >
> > Out[27]=2.
> > -----------------
> > When I use = instead of := it works OK.
> > Why ?
> >
> > It is safely to use "=" in function definition ?
> >
> > I have to integrate and differentiate such function in the future.
> > In my case function depends on about 20 parameters, which are
> > calculated
> > three times, (I want to obtain three functions)
> >
> > I'm not sure is this good idea to use '=' ?
> >
> > Regards , Olaf
> >
> >
>
> As a newbie I guess that:
>
>   := says to the function:  "My dear, do not worry, I will kiss you 
>
> after we walk out when the dance is called"
>
> = says to the function:  "My dear, do not worry, I kiss you right
> now, and we walk out when the dance is called"
>
> J=E1nos
>
>
> ------------------------------------------
> "The shortest route between two points is the middleman"  Ayn Rand
>
>
>


--
http://chris.chiasson.name/


  • Prev by Date: Re: Integral question
  • Next by Date: Re: Integral question
  • Previous by thread: Re: Fuction definition
  • Next by thread: ReplaceList and //.