Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2001

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

Search the Archive

Re: variables versus functions

  • To: mathgroup at
  • Subject: [mg28803] Re: variables versus functions
  • From: "Paul Lutus" <nospam at>
  • Date: Mon, 14 May 2001 01:32:55 -0400 (EDT)
  • References: <9dld6m$>
  • Sender: owner-wri-mathgroup at

"Julian Sweet" <jsweet at> wrote in message
news:9dld6m$o9g at
> How is it different to define a variable such as A=Cos[x]
> versus a function  A[x_]:=Cos[x] ?

In the first case, x must be predefined:

a = Cos[x]

x = Pi


In the second, x doesn't have to be defined at all outside the function:

f[x_] := Cos[x]


Paul Lutus

  • Prev by Date: RE: Exponential Equations
  • Next by Date: Re: Exponential Equations
  • Previous by thread: variables versus functions
  • Next by thread: Re: variables versus functions