[Critical part of question in subject: "ab" mode in fopen]
pereges wrote:
>
Can I use this mode to create a new file , add some data and then
append more data ?
Yes.
How is it different from ab+ ?
"ab" is "append; open or create binary file for writing at end-of-file"
and "ab+" is "append; open or create binary file for update, writing at
end-of-file".
In other words, the difference is that "ab" is write-only, while "ab+"
is read/write.
On Apr 10, 10:18 pm, Kenneth Brody <kenbr...@spamc op.netwrote:
[Critical part of question in subject: "ab" mode in fopen]
>
pereges wrote:
>
Can I use this mode to create a new file , add some data and then
append more data ?
>
Yes.
>
How is it different from ab+ ?
>
"ab" is "append; open or create binary file for writing at end-of-file"
and "ab+" is "append; open or create binary file for update, writing at
end-of-file".
>
In other words, the difference is that "ab" is write-only, while "ab+"
is read/write.
Then in that case, ab+ is better if you want to do write followed by
read in same function.
On Apr 10, 10:18 pm, Kenneth Brody <kenbr...@spamc op.netwrote:
>[Critical part of question in subject: "ab" mode in fopen]
>>
>pereges wrote:
>>
>>Can I use this mode to create a new file , add some data and then
>>append more data ?
>>
>Yes.
>>
>>How is it different from ab+ ?
>>
>"ab" is "append; open or create binary file for writing at
>end-of-file" and "ab+" is "append; open or create binary file for
>update, writing at end-of-file".
>>
>In other words, the difference is that "ab" is write-only, while
>"ab+" is read/write.
>
Then in that case, ab+ is better if you want to do write followed by
read in same function.
Comment