MathGroup Archive 2011

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

Search the Archive

Re: Mystifying Scoping of Piecewise Variable?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116129] Re: Mystifying Scoping of Piecewise Variable?
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Thu, 3 Feb 2011 05:28:14 -0500 (EST)
  • References: <iibduv$npg$1@smc.vnet.net>

Hi,

> Perhaps I'm tired, but this is weird:
> 
> Clear[myFunc]
> 
> myFunc[y_] = Piecewise[{{x^2, x < 0}, {x, x >= 0}}]
>    (Same behavior below for either Set(=) or SetDelayed(:=) )
>

It is just that you use y on the LHS but x on the RHS...
Oh yes, I guess you were tired :-)...

hth,

albert


  • Prev by Date: Re: Pattern matching in lists
  • Next by Date: Quickest way to find a package's file?
  • Previous by thread: Mystifying Scoping of Piecewise Variable?
  • Next by thread: Re: Mystifying Scoping of Piecewise Variable?