MathGroup Archive 2006

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

Search the Archive

Re: Using Map with function that has options...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68504] Re: Using Map with function that has options...
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Tue, 8 Aug 2006 06:28:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8/7/06 at 1:40 AM, giacomo.ciani at gmail.com (Giacomo Ciani) wrote:

>I have several expressions I whant to convert to string and then
>concatenate togheter to create a message to be sent to the standard
>output and written on a text log file. To avoid manually appliyng
>ToString to each of them, I'm using something like:

>myMessage = StringJoin@@Map[ToString,{expr1,expr2,expr3,...,exprN}]

>The problem is that I would like to specify the option
>"TraditionalForm" for ToString (without that, the exponents are
>written on a different line compromising the formatting), but I
>can't understand if using this tecnique I can do that, and how.

The simplest most direct way I know to do this would be to use pure functions, i.e.,

StringJoin@@Map[ToString[#,TraditionalForm]&,{expr1,expr2 ... exprN}]
--
To reply via email subtract one hundred and four


  • Prev by Date: Multiplying Elements of arrays: Inner product
  • Next by Date: Re: Re: Re: Finding the Number of Pythagorean Triples below a bound
  • Previous by thread: Re: Using Map with function that has options...
  • Next by thread: Re: Using Map with function that has options...