Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9520 > unrolled thread

Text["x=" x] reverses order of terms producing the string: 1.2 x=

Started byDaniel <daniel.bentsur@gmail.com>
First post2012-04-08 08:15 +0000
Last post2012-04-09 09:34 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Text["x=" x] reverses order of terms producing the string: 1.2 x= Daniel <daniel.bentsur@gmail.com> - 2012-04-08 08:15 +0000
    Re: Text["x=" x] reverses order of terms producing the string: 1.2 x= Narasimham <mathma18@hotmail.com> - 2012-04-09 09:34 +0000

#9520 — Text["x=" x] reverses order of terms producing the string: 1.2 x=

FromDaniel <daniel.bentsur@gmail.com>
Date2012-04-08 08:15 +0000
SubjectText["x=" x] reverses order of terms producing the string: 1.2 x=
Message-ID<jlrhfc$en3$1@smc.vnet.net>
I don't yet understand the subtleties of evaluation order, but this seems unintuitive.

I've managed to get the representation I want with Text[StringJoin["x= ", ToString[x]]],
but would prefer both to understand what's happening and reduce verbosity.

thanks.

[toc] | [next] | [standalone]


#9534

FromNarasimham <mathma18@hotmail.com>
Date2012-04-09 09:34 +0000
Message-ID<jluaes$rq5$1@smc.vnet.net>
In reply to#9520
On Apr 8, 1:15 pm, Daniel <daniel.bent...@gmail.com> wrote:
> I don't yet understand the subtleties of evaluation order, but this seems unintuitive.
>
> I've managed to get the representation I want with Text[StringJoin["x= ", ToString[x]]],
> but would prefer both to understand what's happening and reduce verbosity.
>
> thanks.

Left to right, tail of first joined to head of second.

XX = Range[1, 9, 2]
YY = Range[5, 50, 10]
Join[ XX, YY]

Narasimham

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web