From: Farzan H. <far...@ho...> - 2006-07-12 11:55:48
|
Dear Per Westermark, Thanks for your answer. It was really amazing ! But that caused a question. Do you mean that the ONLY, ONLY, and ONLY difference between text streams and binary streams is the way that they handle NEWLINE ????? Before I read your mail ,I used to consider that the difference is the way that numbers are processed. Imagine we have: int i=3D12; fprintf(file,"%i",i); As you know,the result file will have 2 bytes because "12" contains only 2 ASCII characters.In other words,the number 12 is first stringized and then it is into the file. But assume we use int i=3D12; fwrite(&i,sizeof(int),1,file); the made file will be 4 bytes long since integers consume 4 bytes.And of course, it is impossible to read this file using a text editor because the BINARY format of "12" is used and the number is not stringize= d. By reading what you said I'm getting to realized that the idea I had, was wrong and how numbers are handled is not related to the type of streams but to the function. And if so, is there any other character change in a text stream (except newline of course!)??? Thanks, On Wed, 12 Jul 2006 01:59:48 +0330, Per Westermark <pw...@ia...>= =20 wrote: > Hungry Mind --=20 Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ |