Re: stdout.writeline output issue



Pegasus (MVP) wrote:
<ibeanon@xxxxxxxxx> wrote:
... I cannot figure out why my output (to
the console) is not what I expect.
....

You can easily resolve these problems by examining the problem
string in detail, e.g. like so:

str = ""
For i = 1 To Len(tmp)
str = str & Asc(Mid(tmp, i, 1)) & " "
Next
wscript.echo str

You would immediately notice that the string "tmp" is terminated
by $0d (carriage return), which others in this thread have also
suggested. This is what's causing your problem.

Good idea. I forgot to mention, the output OP sees is only seen when output
is sent to console because CR without the LF causes output on screen to
overwrite itself. If redirected to a file and then viewed with a text
editor, the output can be seen differently.

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

.



Relevant Pages