Parse or Pass?

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

    Parse or Pass?

    I'm very confused...I want to describe passing variables to functions
    and I've seen these two words used in very similar contexts.

    Is there a difference between them?

  • Steve Holden

    #2
    Re: Parse or Pass?

    frenchy64 wrote:
    I'm very confused...I want to describe passing variables to functions
    and I've seen these two words used in very similar contexts.
    >
    Is there a difference between them?
    >
    In general, "parsing" is analyzing the grammatical structure of a
    string. People sometimes talk loosely about "parsing the command line".
    but I don't think that's normally applied to providing the actual
    arguments (corresponding to the definition's "formal parameters") when a
    function is called - that's argument passing.

    regards
    Steve
    --
    Steve Holden +1 571 484 6266 +1 800 494 3119
    Holden Web LLC/Ltd http://www.holdenweb.com
    Skype: holdenweb http://del.icio.us/steve.holden
    --------------- Asciimercial ------------------
    Get on the web: Blog, lens and tag the Internet
    Many services currently offer free registration
    ----------- Thank You for Reading -------------

    Comment

    • frenchy64

      #3
      Re: Parse or Pass?

      In general, "parsing" is analyzing the grammatical structure of a
      string. People sometimes talk loosely about "parsing the command line".
      but I don't think that's normally applied to providing the actual
      arguments (corresponding to the definition's "formal parameters") when a
      function is called - that's argument passing.
      >
      regards
      Steve
      Thanks Steve, great post!

      Comment

      • =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

        #4
        Re: Parse or Pass?

        In general, "parsing" is analyzing the grammatical structure of a
        string. People sometimes talk loosely about "parsing the command line".
        but I don't think that's normally applied to providing the actual
        arguments (corresponding to the definition's "formal parameters") when a
        function is called - that's argument passing.
        I find that people often use "parsing" in contexts where my
        (non-native) language feeling says it should not be used.

        For example, people talk about "parsing" trees, meaning that
        they perform some processing on the tree with the objective
        of extracting certain information. In the same sense, I
        have seen people "parsing" lists - meaning they iterate over
        the list.

        If I extrapolate my experience with German IT language, I
        think people often use terminology they have not fully
        understood. I often ask my students what the difference
        between "eingeben", "ausgeben", "übergeben" und
        "zurückgebe n" is when they start saying that "die
        Funktion gibt das Ergebnis aus".

        Regards,
        Martin

        Comment

        • Martin P. Hellwig

          #5
          Re: Parse or Pass?

          Martin v. Löwis wrote:
          <cut>
          If I extrapolate my experience with German IT language, I
          think people often use terminology they have not fully
          understood. I often ask my students what the difference
          between "eingeben", "ausgeben", "übergeben" und
          "zurückgebe n" is when they start saying that "die
          Funktion gibt das Ergebnis aus".
          >
          Regards,
          Martin
          Interesting, I lived my early childhood in Germany and somehow, now I
          see it all written in once, I have the feeling I get more confused. So
          would you agree with my interpretation?

          Eingeben = <Giving inInput: (A bit of) data from outside the function
          Ausgeben = <Giving outOutput: (A bit of) data to display, network
          connection or file
          Zurückgeben = <Giving backReturn: (altered)(bits of) data (from Input)
          to Output

          Can I assume that Return in general always means that the particular
          function has exited with that? If not what is the difference then
          between Output and Return?

          Another thing is that with the above statement the opposite could be
          true too, meaning that Input in the German meaning would only been done
          when the function is initiated but how do you call the other input then?
          The appropriate German word would be "Zugeben", which translates to
          Enter (Giving too).

          And then we have "Übergeben" which translates to throughput (giving
          over), which in my view is just something that gets data in and puts it
          out, contextually unaltered. But would that do that with exiting the
          function or not? If it's not both what's the other one called?
          "Übernemen" perhaps (Taking over)?

          Hmm feels like textbook classics, only if I knew which book, probably
          programming 101 :-)

          --
          mph

          Comment

          • A.T.Hofkamp

            #6
            Re: Parse or Pass?

            On 2007-09-05, Martin P. Hellwig <mhellwig@xs4al l.nlwrote:
            Martin v. Löwis wrote:
            Eingeben = <Giving inInput: (A bit of) data from outside the function
            Ausgeben = <Giving outOutput: (A bit of) data to display, network
            connection or file
            Zurückgeben = <Giving backReturn: (altered)(bits of) data (from Input)
            to Output
            >
            Can I assume that Return in general always means that the particular
            function has exited with that? If not what is the difference then
            between Output and Return?
            It depends on your point of view imho.

            You can describe a function call from 'outside', ie I give it values for its
            parameters, and it returns me a computed return value.
            You can describe the same thing from 'inside', ie I get values from my caller,
            compute a result, and output the result.
            And then we have "Übergeben" which translates to throughput (giving
            over), which in my view is just something that gets data in and puts it
            out, contextually unaltered. But would that do that with exiting the
            I would consider this yet another view, namely performance. Function calls are
            stil happening, but you focus more on the #calls/second, ie throughput.


            So depending on what one is interested in, I think, one structures and
            describes what is happening in a different way.
            Wouldn't that be a possible explanation for all the subtle different ways of
            describing the same thing?

            Albert

            Comment

            Working...