473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Unwanted spacing in outputting file

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.

--
Xero

http://www.chezjeff.net
My personal web portal
Nov 21 '05 #1
2 1507
"Xero" <jeff_@_chezjeff_._net(remove_underscores_and_this )> schrieb:
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'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Xero,

Have a look at the streamwriter, in my opinion that is much easier to use
than the very outdated Bacic method you use now.

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps?

Cor
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Geoff Hague | last post by:
(posted to both alt.html and c.i.w.a.s. as I'm not sure what, exactly, is at fault here) I'm doing a site re-design: http://www.captainsoftheworld.com/cotw/index.html...
2
by: DC Gringo | last post by:
I am outputting a datatable to a tab-delimited file. This all works well and good with 2 issues: 1) There is some data in my table that looks like this: <a_tag>theData</a_tag>. I would like to...
1
by: David Gibson | last post by:
Hi, Is there a function to remove double spacing between some names in a text field. I have a text field with names where the name can be 1, 2, 3 or rarely 4 words & there is dounle spacing...
3
by: DC Gringo | last post by:
I have a panel that's inserting and unwanted <div> tag around it ...how can I disable that? <ASP:PANEL ID="pnlCentralAmerica" RUNAT="server" > <LI CLASS="rightSideBar"> <A...
3
by: Jeff Calico | last post by:
Hello everyone I am transforming an XML document to text, basically only outputting a small portion of it. When I run the following XSLT via Xalan's processor, I get a bunch of unwanted blank...
4
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it...
1
by: replyrpatil | last post by:
What I am trying to do: I need to print a compact access report (font 6 size) created using RTF2 program developed by Stephen Lebans to generate a TIF image of custom size (5.5 in x 2.0 in) ...
4
by: Mamluk Caliph | last post by:
For quite some time I've used code as the following to be able to "cut&paste" parts from different headerfiles of the same name. It has worked with GCC, MS, Borland, Keil to name a few. In...
0
by: howa | last post by:
Consider a simple HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>YUI</title> <link rel="stylesheet"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.