Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'WriteString does not respect FormatType' topicStudent Support Forum > General > Archives > "WriteString does not respect FormatType"

Help | Reply To Topic
Author Comment/Response
Adrian
02/17/12 03:32am

Hi,

if I open a file with

str = OpenWrite[filename, FormatType->FortranForm];

then, for instance, Write[str,N[Pi^100]] has the expected behaviour (it yields 5.187848314319587e49), whereas WriteString[str, N[Pi^100]] does not (it writes the string in OutputForm to the file).

Is this a bug or a feature? I can't use Write because I have lots of strings and Write always prints quotes. My workaround is to use FortranForm within WriteString, but it is really annoying.

Adrian

URL: ,
Help | Reply To Topic