Separating arguments of a function: Difference between revisions

From Why start at x, y, z
(Created page with "In English, a comma normally separates components of a bracketed list, such as the arguments of a function. For example, \(f(x,y)\) is the application of a function \(f\) to...")
 
No edit summary
Line 12: Line 12:


Others use spacing to separate items, in addition to a comma, such as \(f(1,\, 2)\). (but [[Space is significant]]!)
Others use spacing to separate items, in addition to a comma, such as \(f(1,\, 2)\). (but [[Space is significant]]!)
[[Category:Ambiguities]]
[[Category:Local variations]]

Revision as of 12:54, 20 November 2021

In English, a comma normally separates components of a bracketed list, such as the arguments of a function.

For example, \(f(x,y)\) is the application of a function \(f\) to two arguments, \(x\) and \(y\).

When the convention for number notation is to use a comma as the decimal separator, this can lead to an ambiguity when the arguments are numbers.

For example, is \(f(1,2)\) the application of a function of one argument, or two?

Instead, a common convention is to use a semicolon as the item separator.

For example, \(f(1;2)\) is unambiguously a function of two arguments.

Others use spacing to separate items, in addition to a comma, such as \(f(1,\, 2)\). (but Space is significant!)