Re: confused abt file operations



"siliconwafer" <spdandavate@xxxxxxxxx> wrote:
# Hi All,
# If I open a binary file in text mode and use text functions to
# read it then will I be reading numbers as characters or actual
# values?
# What if I open a text file and read it using binary read functions.

There are not text and binary functions. The functions work either way,
but they may have slightly different results if the file is text or
binary. That might include things like text line definitions, end of
file markers, file positions in fseek and ftell, etc. What the difference
really are depends on the system.

On Unices, text and binary modes are the same thing.


--
SM Ryan http://www.rawbw.com/~wyrmwif/
She broke your heart and inadvertently drove men to deviant lifestyles.
.



Relevant Pages

  • Re: Little C Help Please
    ... characters to read, so it hapily goes on reading even when the buffer ... represent the size of the buffer, and stops reading before that number ... I think the OP's problem was not a space in the input, but a newline ... Dig the even newer still, yet more improved, sig! ...
    (comp.os.linux.development.apps)
  • Re: Little C Help Please
    ... characters to read, so it hapily goes on reading even when the buffer ... represent the size of the buffer, and stops reading before that number ... I think the OP's problem was not a space in the input, but a newline ... Dig the even newer still, yet more improved, sig! ...
    (comp.unix.programmer)
  • Re: Whats the weirdest human language?
    ... you learn to match up combinations of two or more characters to recognize a word so that you can then pronounce it. ... He gets the meaning from context and doesn't give a fig what the pronunciation is. ... it becomes a logic puzzle that bears very little resemblance to reading. ... Japanese and Chinese people have both told me that they do this constantly while reading, and they can't understand why Westerners have such a problem reading words that they can't say. ...
    (talk.origins)
  • Re: Kals Storm Shadow =?windows-1252?Q?=93Schatzie=94_1977_=96?= =?windows-1252?Q?_2008?=
    ... We briefly reminisced on the walk to the pasture about our many years’ ... Her great heart continued beating for about a minute. ... This was the sad end of a long life that contained too many episodes of learning, accomplishment, fun, and wonder to be recounted in one place. ... Thanks for reading. ...
    (rec.equestrian)
  • A Song of Ice and Fire - My Impressions (no spoilers)
    ... I just finished reading book 3 of the George R. ... Swords" straight through. ... I've just finished "A Storm of Swords," today being Feb 15th. ... The characters are detailed individuals, ...
    (rec.arts.sf.written)