MathGroup Archive 1998

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

Search the Archive

Re: Is this a bug?

  • To: mathgroup at
  • Subject: [mg13462] Re: Is this a bug?
  • From: bruck at (Ronald Bruck)
  • Date: Fri, 24 Jul 1998 01:45:47 -0400
  • Organization: University of Southern California, Los Angeles, CA
  • References: <6p6oa9$>
  • Sender: owner-wri-mathgroup at

In article <6p6oa9$56m at>,  <jfreeze at> wrote:
>The following seems to be a bug. In the first example, both the true and
>the false parts of If are being evaluated. In the secon example, only
>the true part. If this is not a bug, could someone please explain this
>behavior to me. Thanks
>     Clear[x,y];
>     Print[x,y];
>     55

Quote: "Evaluate[expr] causes expr to be evaluated even if it appears as
the argument of a function whose attributes specify that it should be
held unevaluated."

When you ask for Attributes[If], Mathematica returns {HoldRest,
Protected}. Quote:  "HoldRest is an attribute which specifies that all
but the first argument to a function are to be maintained in an
unevaluated form."

So it's not a bug.

Mathematica's help browser is EXCELLENT.

--Ron Bruck

  • Prev by Date: Re: Is this a bug?
  • Next by Date: Re: $BatchOutput
  • Previous by thread: Re: Is this a bug?
  • Next by thread: Re: Re: Is this a bug?