G
gwhite
I can't figure out how to stop the "add a space at the beginning"
behavior of the print function.
1 2
See the space in between the 1 and the 2 at the output print to the
command console?
The help for print is:
"A space is written before each object is (converted and) written,
unless the output system believes it is positioned at the beginning of
a line."
So it is apparently doing what it is supposed to do.
Is there a way to stop this? Or is there a different function that
will only print what you have in the formatted string?
For example, in MATLAB I only had to do:
12
fprintf works the same way if printing to a file. It only puts in
what you explicitly tell it to put in.
behavior of the print function.
1 2
See the space in between the 1 and the 2 at the output print to the
command console?
The help for print is:
"A space is written before each object is (converted and) written,
unless the output system believes it is positioned at the beginning of
a line."
So it is apparently doing what it is supposed to do.
Is there a way to stop this? Or is there a different function that
will only print what you have in the formatted string?
For example, in MATLAB I only had to do:
12
fprintf works the same way if printing to a file. It only puts in
what you explicitly tell it to put in.