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


Groups > comp.soft-sys.math.mathematica > #4758

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

From Patrick Scheibe <pscheibe@trm.uni-leipzig.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Print bug with -script? (quotes display)
Date 2011-09-05 11:17 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j42b57$rsl$1@smc.vnet.net> (permalink)
References <201109042206.SAA21519@smc.vnet.net>

Show all headers | View raw


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
> 


Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: Print bug with -script? (quotes display) Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2011-09-05 11:17 +0000
  Re: Print bug with -script? (quotes display) Alan <alan.isaac@gmail.com> - 2011-09-06 07:59 +0000
  Re: Print bug with -script? (quotes display) Alan <alan.isaac@gmail.com> - 2011-09-06 08:00 +0000
  Re: Print bug with -script? (quotes display) Alan <alan.isaac@gmail.com> - 2011-09-06 08:07 +0000
  Re: Print bug with -script? (quotes display) Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2011-09-07 09:47 +0000

csiph-web