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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sequential Files that are interactive

Status
Not open for further replies.

LittleBeaner

Programmer
Dec 8, 2002
2
US
I am working a sequential file that is interactive. This part works but what my question is.

Why do my numbers not come out on the sample.dat with the 0's?

This is what it should look like:

001 3 1.10 100 .50



this is what it does look like.
1, 3, 1.1, 100, .5

Could someone please help me. I have been trying to figure it out and cannot.
thanks Cindy
 
its because a .dat file is in binary and in binary 001 is written the same way as 1 and the same with 1.10 and .50 .you might want to save it as a .txt file and read it fromt here because then you won't lose the extra zero's
 
The way to get around this is to use a RANDOM file and use strings: "001"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top