Results (
Thai) 1:
[Copy]Copied!
Advantages to Text Files• Easy to check the contents (type or cat it, or use aneditor)• Very flexible structure because of end-of-linedelimiters. Each line can be a different length• Can check the read/write logic by examining the fileon the console.• Generally portable from one computer platform toanother.• Can be quite large. (A double can need up to about20 characters.)Advantages to Binary Files• Faster to read and write than text files (especially fornumeric values)• For mostly numeric data, they require less disk spacethan text files (to hold equivalent amount of data)• Programs can be simpler due to the ability to writemultiple records in one statement.• Typically much smaller. (A double is usually 8 bytes.) 4/23/201514When to use Text Files• When all the data to be stored are characterstrings, and the strings are many differentlengths.• When you need your data to be humanreadable.• When you need to be able to write a file onone computer platform, and read it onanother.When to use Binary Files• When much of the data to be stored isnumeric.• When there is a lot of data to be stored.• When the data to be stored all have the same
Being translated, please wait..
