Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/15/08 13:36
Read: times


 
#159084 - No buts!
Responding to: ???'s previous message
Raghunathan said:
... there are certain requirements that require you to know the exact number of bytes that you are going to write

Exactly - nobody is arguing with that!

In fact, precisely because it is essential to know the actual number of characters is why Per said:
That is why you should never (N.E.V.E.R.) manually "count" the number of produced characters.


In fact, because you do need to know this before writing, you cannot use printf - you must use sprintf or somesuch to fill a buffer first so that you can check the buffer before comitting it to the file system!


List of 17 messages in thread
TopicAuthorDate
How many bytes will be written ??            01/01/70 00:00      
   return value?            01/01/70 00:00      
      OT: That's why you should never use TABs!            01/01/70 00:00      
         go ahead and use tabs            01/01/70 00:00      
            No, don't!            01/01/70 00:00      
            Any programmers editor            01/01/70 00:00      
               insert spaces for TABs            01/01/70 00:00      
      Oh Yes ... the sprintf()...            01/01/70 00:00      
         So here we go            01/01/70 00:00      
            Wrong!            01/01/70 00:00      
               Valid warnings. But...            01/01/70 00:00      
                  No buts!            01/01/70 00:00      
                     maintability and engineering            01/01/70 00:00      
               Not entirely true?            01/01/70 00:00      
                  You are correct            01/01/70 00:00      
                     Good example of counting dangers            01/01/70 00:00      
                        Good interaction.            01/01/70 00:00      

Back to Subject List