free-format input

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mdh

    #1

    free-format input

    An example on p96 of K&R II shows how to use pointers. It's a function
    called getint to perform "free-format input conversion".
    Once again, sorry for the question...but what exactly is "free-format
    input"? Is there "non-free format input". It is obviously significant,
    else it would not have been mentioned.
    Thanks in advance.

  • Jack Klein

    #2
    Re: free-format input

    On 13 Nov 2006 18:33:36 -0800, "mdh" <mdeh@comcast.n etwrote in
    comp.lang.c:
    An example on p96 of K&R II shows how to use pointers. It's a function
    called getint to perform "free-format input conversion".
    Once again, sorry for the question...but what exactly is "free-format
    input"? Is there "non-free format input". It is obviously significant,
    else it would not have been mentioned.
    Thanks in advance.
    This is not exactly a C language specific question.

    The opposite would be fixed format input conversion, for example a
    program that only reads data from fixed columns, or in fixed formats.

    An example of fixed format input might be a file containing:

    +32.767
    -16.383
    +00.000

    Where every line must contain a + or - sign in the first character,
    followed by two digits, a decimal point, and three more digits. Any
    deviation would be considered an input error and rejected.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c++-faq-lite/
    alt.comp.lang.l earn.c-c++

    Comment

    • mdh

      #3
      Re: free-format input


      Jack Klein wrote:
      >
      This is not exactly a C language specific question.
      >

      yes...I thougth so...but thanks for that.

      Comment

      Working...