Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: will someone explain the behavior of Unevaluated in this example?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71434] Re: will someone explain the behavior of Unevaluated in this example?
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sat, 18 Nov 2006 04:41:05 -0500 (EST)
  • References: <acbec1a40611180027m5fb197b9hcb414978770ca4ef@mail.gmail.com>

sorry, that second one should be:

Block[{q = 5, f, g}, {Module[{f =
    Unevaluated[q], g}, g =
      Block[{Unevaluated}, First@f]; f === g], Unevaluated[q] === q}]

(and it still produces {False, False})

also, I have a similar expression in some code, and a TracePrint on it
contains this:

Unevaluated[names["1", "0"]] === names["1", "0"]

with the _next line_ saying False

(even though Unevaluated and SameQ aren't Blocked and names isn't
Blocked, but doesn't have a value) (afaik)

On 11/18/06, Chris Chiasson <chris at chiasson.name> wrote:
> Block[{q = 5, f, g}, {Module[{f =
>     Unevaluated[q], g}, g = Evaluate@f; f === g], Unevaluated[q] === q}]
>
> gives {True,False}, which is unexpected (by myself)
>
> Block[{q = 5, f, g}, {Module[{f = Unevaluated[q], g},
>     g = Block[{Unevaluated}, f]; f === g], Unevaluated[q] === q}]
>
> gives {False,False}, as expected
>
> --
> http://chris.chiasson.name/
>


-- 
http://chris.chiasson.name/


  • Prev by Date: verify the result of indefinite integration
  • Next by Date: a strange integral
  • Previous by thread: verify the result of indefinite integration
  • Next by thread: Re: will someone explain the behavior of Unevaluated in this example?