MathGroup Archive 2006

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

Search the Archive

Re: this expression doesn't do what I expected - what's wrong?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68976] Re: this expression doesn't do what I expected - what's wrong?
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sat, 26 Aug 2006 02:03:59 -0400 (EDT)
  • References: <acbec1a40608241023i4980bbc1m8e49019485597094@mail.gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Nevermind, I realized what was wrong when I went to take a second
crack at my "pattern match and formatting challenge".

I was using StringExpression instead of the infix form of Prepend.

On 8/24/06, Chris Chiasson <chris at chiasson.name> wrote:
> In[1]:=
> Table[Unevaluated[Sequence[{X[C][i],Y[C][i]}]],{i,4}]~~
>   Prepend~~"Corner (Geometric) Variable"
>
> Out[1]=
> {{X[C][1],Y[C][1]},{X[C][2],Y[C][2]},{X[C][3],Y[C][3]},{X[C][4],
>       Y[C][4]}}~~Prepend~~Corner (Geometric) Variable
>
> I expected the result of the following command, because the two forms
> of input should parse to an identical expression, AFAIK:
>
> In[2]:=
> Prepend[Table[
>     Unevaluated[Sequence[{X[C][i],Y[C][i]}]],{i,
>       4}],"Corner (Geometric) Variable"]
>
> Out[2]=
> {Corner (Geometric) Variable,{X[C][1],Y[C][1]},{X[C][2],Y[C][2]},{X[C][3],
>     Y[C][3]},{X[C][4],Y[C][4]}}
>
> What's wrong?
>
>
>
> --
> http://chris.chiasson.name/
>


  • Prev by Date: Re: Change of Basis function
  • Next by Date: Re: Change of Basis function
  • Previous by thread: this expression doesn't do what I expected - what's wrong?
  • Next by thread: Subscript vs SubscriptBox