0

I am trying to develop a Shunting-Yard Algorithm based on pseudocode from the Wikipedia page.

One of the operations states:

If the token is a function argument separator (e.g., a comma) [...]

Could someone please clarify what this means?

Mr. Xcoder
  • 4,719
  • 5
  • 26
  • 44
user3120023
  • 197
  • 3
  • 6
  • 16

2 Answers2

2

It's simply referring to however the language specifies separations between the arguments of a function.

For example, in Java:

public void foo(int a, int b) { ... }

The function arguments a and b are separated using a comma.

Ben Siver
  • 2,758
  • 1
  • 25
  • 42
  • Hi,Thanks very much for the quick reply :) In terms of the shunting-yard algorithm code here: http://en.wikipedia.org/wiki/Shunting-yard_algorithm#The_algorithm_in_detail What does this mean Thanks in advance – user3120023 Dec 19 '13 at 20:18
1

Lets say you have a function that takes 3 parameters or arguments:

someFunction(int i, String s, boolean b) {}

Each one of those parameters is separated by a comma. This is how it is done in java and many other languages but perhaps there are other separators used in some languages as well.

Hope it helps :)

takendarkk
  • 3,347
  • 8
  • 25
  • 37
  • Hi,Thanks very much for the quick reply :) In terms of the shunting-yard algorithm code here: en.wikipedia.org/wiki/… What does this mean Thanks in advance – user3120023 Dec 19 '13 at 20:49
  • 1
    I don't know how to put it into any other words. It really is self explanatory. Each parameter to a function is separated by something (a comma, etc...) and the algorithm wants you to find those things. This will allow you to find how many parameters have been passed in. – takendarkk Dec 19 '13 at 21:45