Re: MatchQ[x^1, x^_Integer]
- To: mathgroup at smc.vnet.net
- Subject: [mg38985] Re: MatchQ[x^1, x^_Integer]
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Thu, 23 Jan 2003 08:05:49 -0500 (EST)
- References: <b0lv4m$59l$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Kimberly Damon yamin" <dykim92 at yahoo.com> wrote in message news:b0lv4m$59l$1 at smc.vnet.net... > MatchQ[x^1, x^_Integer] > I got "False" result. I think I should get "True" for this. > Could anyone explain this ? > > Thanks > Kimberly, x^1 evaluates to x before the match is tested. But we have: MatchQ[Unevaluated[x^1], x^_Integer] True -- Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565