Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: Print bug with -script? (quotes display)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121230] Re: Print bug with -script? (quotes display)
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Mon, 5 Sep 2011 07:06:41 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201109042206.SAA21519@smc.vnet.net>

Hi,

same here in Linux but I don't consider this as a bug. It's just that
the Mathematica frontend usually displays strings without the quotes: 

{DisplayForm[#], InputForm[#], FullForm[#]} &["Hello you"]


In console script mode this seems to get lost. Isn't there in Vista a
way to write directly to the stdout-stream? Here, something like

PrintToConsole[str_String]:=WriteString[OutputStream["stdout",1],str<>"\n"];
PrintToConsole[obj_]:=PrintToConsole[ToString[obj]];

PrintToConsole["Sheldor is back online"];

can be used. Maybe you want to check the output of Streams[] on your
system.

Hope this helps.

Cheers
Patrick

On Sun, 2011-09-04 at 18:06 -0400, Alan wrote:
> I am using Mathematica under Windows Vista.  To run Mathematica commands as a script, my understanding is that I should invoke
>     math.exe -script <scriptname>
> This is working, but if I print a string
>     Print["Test"]
> it prints surrounded by quotes (as written literally).
> I find this highly undesirable: can the quotes be suppressed?
> 
> Also, this behavior seems to conflict with the documentation:
> http://reference.wolfram.com/mathematica/tutorial/PropertiesOfStrings.html 
> 
> Is it a bug?
> 
> Thanks,
> Alan Isaac
> 






  • Prev by Date: Re: Quit versus Clear["Global`*"]
  • Next by Date: Re: need a quicker method for SquaresR func
  • Previous by thread: Print bug with -script? (quotes display)
  • Next by thread: Re: Print bug with -script? (quotes display)