MathGroup Archive 2005

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

Search the Archive

UpValues for Blank[foo]


I wonder what's I'm doing wrong.  I'm trying to change the upvalues of a
function with respect to Blank[] so as to have it dynamically changed
into something else, e.g.

    := F /: Blank[F] := _?FQ

where FQ[F] returns true, and false on anything else, but although
installed it doesn't appear to work.

To simplify the example I wondered whether I could define my own _F to
behave like _Integer, i.e.

    := F /: Blank[F] := Blank[Integer]

which appears to be in place as a rule:

    := ?? F
    Global`F
    _F := _Integer

but doesn't work:

    := _F // FullForm
    Blank[F]

I thought that maybe wrapping HoldPattern[] around the Blank[F] in the
upvalue rule might have fixed it, but it doesn't.

Is there some special handling for Blank[] within mathematica? Can I
circumvent it somehow?

Joe
--
Josef Karthauser (joe at tao.org.uk)	       http://www.josef-k.net/
FreeBSD (cvs meister, admin and hacker)     http://www.uk.FreeBSD.org/
Physics Particle Theory (student)   http://www.pact.cpes.sussex.ac.uk/
================ An eclectic mix of fact and theory. =================


  • Prev by Date: Re: Create Permanent Self Defined Function?
  • Next by Date: Re: [Mathematica 5.1] Bug Report - Two numerical values for a same variable
  • Previous by thread: Re: Mathematica to TeX
  • Next by thread: Re: UpValues for Blank[foo]