Re: On the default buffering of stdout and the future of CLC

Discussion in 'C Programming' started by Kaz Kylheku, Feb 23, 2009.

  1. Kaz Kylheku

    Kaz Kylheku Guest

    On 2009-02-23, Han from China <> wrote:
    > rio wrote:
    >>> printf("Please enter your name below\n");
    >>> fflush(stdout);

    >>
    >> here there is not need for fflush(stdout) because \n flush the line

    >
    > You're assuming stdout is line buffered when it's associated with
    > a typical terminal device. While that's a reasonable assumption to
    > make on a sane system, where stdout should by default be either
    > unbuffered or line buffered, I've demonstrated that an insane system
    > may make stdout fully buffered by default. You know, the DS9K and
    > all that.


    DS9K users are all very sophisticated and can interact with programs without
    seeing the prompts. In fact, they type with their eyes closed anyway.
     
    Kaz Kylheku, Feb 23, 2009
    #1
    1. Advertising

  2. Kaz Kylheku

    Richard Guest

    Kaz Kylheku <> writes:

    > On 2009-02-23, Han from China <> wrote:
    >> rio wrote:
    >>>> printf("Please enter your name below\n");
    >>>> fflush(stdout);
    >>>
    >>> here there is not need for fflush(stdout) because \n flush the line

    >>
    >> You're assuming stdout is line buffered when it's associated with
    >> a typical terminal device. While that's a reasonable assumption to
    >> make on a sane system, where stdout should by default be either
    >> unbuffered or line buffered, I've demonstrated that an insane system
    >> may make stdout fully buffered by default. You know, the DS9K and
    >> all that.

    >
    > DS9K users are all very sophisticated and can interact with programs without
    > seeing the prompts. In fact, they type with their eyes closed anyway.


    They use keyboards?!?!? Wimps.
     
    Richard, Feb 23, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alf P. Steinbach
    Replies:
    1
    Views:
    330
    Adam Aulick
    May 26, 2006
  2. Tony

    More posts in clc than in clc++ ?

    Tony, Feb 8, 2009, in forum: C Programming
    Replies:
    6
    Views:
    362
  3. Chris McDonald
    Replies:
    5
    Views:
    277
    Kenny McCormack
    Feb 22, 2009
  4. Larry Gates
    Replies:
    3
    Views:
    257
    Larry Gates
    Mar 1, 2009
  5. Geoff Bache
    Replies:
    4
    Views:
    603
Loading...

Share This Page