MathGroup Archive 2003

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

Search the Archive

Re: bug with definitions?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40400] Re: bug with definitions?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 4 Apr 2003 01:21:33 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <b6gm2e$cf9$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

but Mathematica must do something with the 
right hand side of RuleDelayed[] otherwise
how become you rule a member of DownValues[] ??

Since Catch[] and Throw[] are non-local operations,
a Throw[] can not protected by the processing
of the right hand side. Just use

Clear[a, z];
Catch[
  z[x_Integer] := 2;
  z[x_] := Throw[11];
  a[i_, iUp_?z] := 3;
  a[i_Integer, iUp_?z] := 5;
 ]


Regards
  Jens

Hein H wrote:
> 
> Why does the following code cause and exception?  I thought that the
> left hand side of := was not evaluated.
> 
> Clear[a, z];
> z[x_Integer] := 2;
> z[x_] := Throw[11];
> a[i_, iUp_?z] := 3;
> a[i_Integer,  iUp_?z] := 5;
> 
> Cheers,
> Hein


  • Prev by Date: Import - FITS
  • Next by Date: Re: Show graphics command
  • Previous by thread: bug with definitions?
  • Next by thread: Re: Re: bug with definitions?