       Re: Problem with condition in function definition !

• To: mathgroup at smc.vnet.net
• Subject: [mg4173] Re: Problem with condition in function definition !
• From: roth at sunny.mpimf-heidelberg.mpg.de (Arnd Roth)
• Date: Tue, 11 Jun 1996 00:52:26 -0400
• Organization: Max-Planck-Institut fuer Medizinische Forschung
• Sender: owner-wri-mathgroup at wolfram.com

```In article <4p5s5n\$ff2 at dragonfly.wolfram.com>
a_kowald at chemie.fu-berlin.de (Axel Kowald) writes:

> For some reason I'd like to define a function with condition in the following way:
>
> b=1
> bla[t_]/;(t<b) := {a,b,c}
>
> bla gives {a,b,c}, fine. But now I want to clear b, Clear[b], and still get
> the same result. So really I want to type 1 instead of b, but for some reason
> can't do it.
>
> Any idea what I have to do ?

How about this?

In:= b = 1
Out= 1

In:= bla[t_] /; Evaluate[t < b] := {a, b, c}

In:= bla
Out= {a, 1, c}

In:= bla
Out= bla

In:= Clear[b]

In:= bla
Out= {a, b, c}

In:= bla
Out= bla

In:= ?bla
Global`bla

bla[t_] /; t < 1 := {a, b, c}

Sincerely,

Arnd Roth
Abteilung Zellphysiologie
Max-Planck-Insitut fuer Medizinische Forschung
Postfach 10 38 20, D-69028 Heidelberg, Germany
http://sunny.mpimf-heidelberg.mpg.de/people/roth/ArndRoth.html

==== [MESSAGE SEPARATOR] ====

```

• Prev by Date: Re: (Q) Mathematica and Microsoft Equation Editor ?
• Next by Date: Re: desperately seeking better minimax approximation package
• Previous by thread: Problem with condition in function definition !
• Next by thread: Re: Problem with condition in function definition !