Thanks Paul Now why couldnt they just say that!

>From: "Paul Herring" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: [c-prog] binary files
>Date: Thu, 29 Mar 2007 17:21:09 +0100
>
>On 3/29/07, glogic_1 <[EMAIL PROTECTED]> wrote:
> >
> > Hey all
> > Just a general query about binary files. Now im aware that getLine
> > doesnt work with binary files but im wondering why this is what
> > actually happens? i checked it out on the net and all the info i found
> > was abit over my head.. can anyone break it down into noob english?
>
>
>A text file is lines separated by linefeeds (a byte or series of bytes
>"unlikely to occur within a line.")
>
>A binary file is just a huge 'lump' of data.
>
>Thus a binary files don't have 'lines' as such (though a/few byte(s) within
>such a file may have the right combination of bytes to mark a line
>delimiter, these aren't "seen" as such.)
>
>If you open a text file in binary mode, linefeeds just 'blur' into the rest
>of the file and 'stop existing' (for the purposes of getline() e.g.)
>
>and also what do i have to watch out for when porting binary files
> > from one computer architecture to another? in some of the info there
> > were references of a danger in doing this but never went into detail..
> > any ideas what this means?
>
>
>There are two issues that spring to mind - one affecting 'binary' files, 
>the
>other 'text' files.
>
>The only thing I could possibly think of affecting binary files would be
>endianess of numbers stored within the file when moved from one 
>architecture
>to another. (One system thinks the first byte is the high byte of an
>integer, the other thinks it's the low byte, for example)
>
>For text files however, different systems (read 'operating systems' 
>loosely)
>have different byte representations of what a 'linefeed' is. If you move a
>text file in binary mode, what were linefeeds on the original system become
>garbage on the destination.
>
>
>
>
>--
>PJH
>Aio, quantitas magna frumentorum est
>
>
>[Non-text portions of this message have been removed]
>

_________________________________________________________________
ItÂ’s tax season, make sure to follow these few simple tips 
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMMartagline



To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/c-prog/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/c-prog/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to