MathGroup Archive 1997

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

Search the Archive

Problem with Conditiond Function

  • To: mathgroup at
  • Subject: [mg7875] Problem with Conditiond Function
  • From: hans.steffani at (Hans Steffani)
  • Date: Thu, 17 Jul 1997 15:35:39 -0400
  • Organization: University of Technology Chemnitz, FRG
  • Sender: owner-wri-mathgroup at

I have problems with the code below.
foo[ Inverse[T11], Scalars->{T11} ]
should produce 1/T11.

This is ok but ofter foo[] is called the first time
Inverse[T11] is always evaluated to 1/T11 which is
not what I want and further calls of foo[] fail.

What am I doing wrong?

Hans Friedrich Steffani

(* I Hope that the Rule will tested every time *)
Inverse[m_] := 1/m /; MemberQ[$theScalars,m];

(* And this is the function which tells what are
$theScalars is *)


$theScalars := theScalars;
expr = expr;
Clear[ $theScalars ];

Inverse[T11]                        (* ok *)
foo[ Inverse[T11], Scalars->{T11} ] (* ok *)
Inverse[T11]                        (* why Do I get 1/T *)
foo[ Inverse[T11], Scalars->{T11} ] (* fails with error *)


Hans Friedrich Steffani
Institut fuer Elektrische Maschinen und Antriebe, TU Chemnitz-Zwickau
mailto:hans.steffani at

  • Prev by Date: Re: Palettes in 2.2 ?
  • Next by Date: Re: multi-dim integration
  • Previous by thread: Re: Palettes in 2.2 ?
  • Next by thread: Re: Problem with Conditiond Function