Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #102806

Re: Using fread function

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Using fread function
Date 2017-01-30 13:57 -0800
Organization None to speak of
Message-ID <ln7f5c9pnz.fsf@kst-u.example.com> (permalink)
References <02c75a0c-84d7-4669-8bde-472730c7f8d3@googlegroups.com> <18a13059-6cfd-47e9-9844-bd18f2ae6731@googlegroups.com> <lnsho09v62.fsf@kst-u.example.com> <6d2650f6-44a4-4cc6-9178-99d44950090c@googlegroups.com>

Show all headers | View raw


Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
> On Monday, January 30, 2017 at 7:57:46 PM UTC, Keith Thompson wrote:
>> Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
>>
>> >   fread(x, sizeof(double), 10, fp);
>> >
>> > which isn't very portable. 
>> 
>> How is that not portable (assuming x points to a chunk of memory big
>> enough to hold 10 doubles)?
>> 
> Because it breaks if your machine representation isn't the same as the
> binary file. 

You're right, of course.  I should have thought of that (I've made the
same point myself enough times).

[...]

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Using fread function janus <emekamicro@gmail.com> - 2017-01-29 10:07 -0800
  Re: Using fread function "James R. Kuyper" <jameskuyper@verizon.net> - 2017-01-29 14:31 -0500
    Re: Using fread function supercat@casperkitty.com - 2017-01-30 08:03 -0800
    Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-01 13:59 -0800
      Re: Using fread function jameskuyper@verizon.net - 2017-02-05 11:40 -0800
        Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-08 22:04 -0800
          Re: Using fread function jameskuyper@verizon.net - 2017-02-09 05:39 -0800
            Re: Using fread function supercat@casperkitty.com - 2017-02-09 07:47 -0800
              Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-02-09 09:19 -0800
                Re: Using fread function supercat@casperkitty.com - 2017-02-09 09:55 -0800
                Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-02-09 12:10 -0800
                Re: Using fread function supercat@casperkitty.com - 2017-02-09 13:01 -0800
              Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-12 09:36 -0800
                Re: Using fread function supercat@casperkitty.com - 2017-02-12 10:52 -0800
                Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-19 21:19 -0800
                Re: Using fread function supercat@casperkitty.com - 2017-02-20 09:35 -0800
                Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-02-20 09:52 -0800
                Re: Using fread function supercat@casperkitty.com - 2017-02-20 11:15 -0800
                Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-02-20 11:45 -0800
                Re: Using fread function "James R. Kuyper" <jameskuyper@verizon.net> - 2017-02-20 15:38 -0500
                Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-23 12:12 -0800
                Re: Using fread function jameskuyper@verizon.net - 2017-02-24 10:37 -0800
                Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-23 05:04 -0800
                Re: Using fread function supercat@casperkitty.com - 2017-02-23 07:58 -0800
                Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-25 11:48 -0800
                Re: Using fread function jameskuyper@verizon.net - 2017-02-25 13:44 -0800
                Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-04-17 13:12 -0700
                Re: Using fread function supercat@casperkitty.com - 2017-04-17 13:50 -0700
            Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-12 09:31 -0800
  Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-01-29 13:14 -0800
  Re: Using fread function Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-01-30 08:18 -0800
    Re: Using fread function supercat@casperkitty.com - 2017-01-30 08:44 -0800
    Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-01-30 11:58 -0800
      Re: Using fread function Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-01-30 13:05 -0800
        Re: Using fread function supercat@casperkitty.com - 2017-01-30 13:39 -0800
        Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-01-30 13:57 -0800

csiph-web