Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not Sure what this title should be. 1

Status
Not open for further replies.

snt

MIS
Jun 19, 2000
104
US
Kind of a unique problem.
There is an instrument that retrieves some data and store it to a file. Part of that code is here:
Print #1, Format(Currentwavelength(i), "#000.00 "); Int(Currentscan(Tarscan, i)); Int(Currentscan(Refscan, i))

The problem is when the software is run on a foreign pc, (different regional settings) the period in #000.00 is a comma. The file will not open this way. As a result, I have 2 questions:
1 - Is there a way to force a period regardless of the regional settings or something similar?

2 - Is there a way to come up with a conversion tool to change all the previously acquired data? There are about 512 lines in the file with a period.

Thanks
 
One thing you could try is something like the following:

WaveString = Format(Currentwavelength(i), "#000.00 ")
WaveString = Replace(WaveString, ",", ".")
Print #1, WaveString; Int(Currentscan(Tarscan, i)); Int(Currentscan(Refscan, i))

This should change any commas back to periods regarless of the system settings before its written to the file
Good Luck
------------
Select * from Users where Clue > 0
0 rows returned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top