Parse or Pass?

F

frenchy64

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?
 
S

Steve Holden

frenchy64 said:
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 -------------
 
F

frenchy64

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!
 
?

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

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ückgeben" is when they start saying that "die
Funktion gibt das Ergebnis aus".

Regards,
Martin
 
M

Martin P. Hellwig

Martin v. Löwis wrote:
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ückgeben" 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 in> Input: (A bit of) data from outside the function
Ausgeben = <Giving out> Output: (A bit of) data to display, network
connection or file
Zurückgeben = <Giving back> Return: (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 :)
 
A

A.T.Hofkamp

Martin v. Löwis wrote:
Eingeben = <Giving in> Input: (A bit of) data from outside the function
Ausgeben = <Giving out> Output: (A bit of) data to display, network
connection or file
Zurückgeben = <Giving back> Return: (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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top