2

How the result may be called when applying an operator to its operands?

In eg. programming one may be familiar with a so-called "expression" like this one from a SO question:

x>y && z==5

The meaning and the exact way of calculating this expression is up to interpretation.

Without getting into the mess, if one knows that

  • > and && and == are called "operators", and are what is called "binary operators" in particular,
  • x, y, z and 5 are "operands", and are said to be the "initial operands",
  • saying that "x>y and z==5 are operands to the operator &&" is in accordance with what is called the "evaluation order" and "operator precedence" that belongs to the particular interpretation,
  • the intended interpretation is not totally screwed up like a troll language, so for example x and y are belonging to >

then you see I don't know how the result of x>5 could be called.

Does it have a name? If an operator operates on an operand, you get a - what?

3
  • 4
    The name is result.
    – Andrew Leach
    Apr 29, 2015 at 11:26
  • 1
    Been in the computer biz for more than 40 years, and all I've ever heard is "result", or some equivalent term such as "output".
    – Hot Licks
    Apr 29, 2015 at 11:33
  • @AndrewLeach Yes I found "result" not specific enough to "operators"... is just my observation; stemming from the way "operators" are. Vice-versa, I'm having trouble expressing the "operands" in a context not specific to operators... (except contexts 'arguments for commands' and 'arguments passed to functions as parameter value'). The need is that result can be already used.
    – n611x007
    Apr 29, 2015 at 11:36

2 Answers 2

4

There is no special term for the output of an operator analogous to the special term for an input (operand), at least not in common use.

Per the Wikipedia article on operators:

The values combined are called operands, arguments, or inputs, and the value produced is called the value, result, or output.

2
  • 2
    people are intuitive. computers are strange. if computers are intuitive, people are strange. not every person is a computer - or at least not all the time!
    – n611x007
    Apr 29, 2015 at 11:44
  • 2
    @naxa Though it rings poetic, I don't quite get the thrust of your comment, there. What do you mean?
    – Dan Bron
    Apr 29, 2015 at 11:49
0

x>y is an expression, formed by the operator '>' and its operands 'x' and 'y'.

z==5 is another expression, formed by the operator '==' and its operands 'z' and '5'.

These two expressions operate with numerical operators, so they require that the operands are either numbers or parameters with an associated numerical value.

But there are also 'boolean operators'. These kind of operators form expressions whose outputs can take the values 'true' or 'false', and require that the operands are also boolean instead of numerical. Therefore, you must consider that the expression 'x>y' has a boolean output itself, which is, in turn, the operand of the expression ruled by the boolean operator '&&'.

The syntaxis is always operand1 OPERATOR operand2 -> result, output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.