Unwanted spacing in outputting file

G

Guest

I use this block of code to output a number to a plain text file:

Dim counter As Double
counter = 1
FileOpen(1, "output.txt", OpenMode.Output)
PrintLine(1, counter)
FileClose(1)

Then I opened the "output.txt" with notepad and this line appeared:

_1_

where the underscores represent a space.

How can I get rid of those spaces? Thanks.
 
H

Herfried K. Wagner [MVP]

Xero said:
FileOpen(1, "output.txt", OpenMode.Output)
PrintLine(1, counter)
FileClose(1)

Then I opened the "output.txt" with notepad and this line appeared:

_1_

where the underscores represent a space.

How can I get rid of those spaces?

Use 'WriteLine' instead of 'PrintLine'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top