expression
English · Suomi
An expression is a non-productive rule that resolves by calculation into a value. They consist of at least one operand, and additional operands may be linked via non-unary operators. An operand may be
- a literal value of any type,
- a variable or constant referred to by its identifier, or
- a function call.
Examples of expressions are:
x + 5'Z'response<>42
Expressions, and parts thereof, can be classified by their result type. Usually primarily arithmetic and logic expressions are distinguished. An arithmetic expression results in a numeric value. A logic expression results in a Boolean value.
remarks
With compiler directive {$extendedSyntax on} a function call as an expression can appear as a statement, too. This is useful if the function triggers side-effects, but the return value is not needed.
see also
- article „expression“ in Wikipedia, the free online encyclopedia
- Tutorial: Boolean expressions
- Tutorial: How to use tFPExpressionParser (if an expression entered by the user shall be interpreted)
From the Free Pascal wiki, page "expression", as it stood on 2023-01-25 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
