Write #FileNum, strString returns "strString"

G

Guest

Hello and thanks in advance

I'm trying to take a textfile that my company uses for Machine Programs and
convert it to a different Machine Format. With one execption, this works
very well.

My thing is, the string that gets outputted as each line gets put in the new
file enclosed in quotes. Any ideas on how to get rid of these?? Any
suggestions appreciated

Here's an example code:

***Code Start***

strOut = "G15 H1 X0 Y0 M3 S8000"
Write #FileNumOut, strOut

***Code End***

This outputs a line to my textfile as:
"G15 H1 X0 Y0 M3 S8000"

Where it's easy enough in a text editor to replace all "s with a
ZeroLengthString, I would like to be able to avoid this for ease of use.

If required I can post all code related to this issue.

Thanks
Jack
 
M

Marshall Barton

Dymondjack said:
I'm trying to take a textfile that my company uses for Machine Programs and
convert it to a different Machine Format. With one execption, this works
very well.

My thing is, the string that gets outputted as each line gets put in the new
file enclosed in quotes. Any ideas on how to get rid of these?? Any
suggestions appreciated

Here's an example code:

***Code Start***

strOut = "G15 H1 X0 Y0 M3 S8000"
Write #FileNumOut, strOut

***Code End***

This outputs a line to my textfile as:
"G15 H1 X0 Y0 M3 S8000"


That's what Write does, it's primary use is to create CSV
type files.

Try using the Print statement instead.
 
G

Guest

Thanks Marshall... that did it. This is a new area for me... I'm finding
that the ability to write files is extremely helpful in a lot of cases.

Thanks
 

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