Topic: assigning values to statements

topics > computer science > data > Group: data value

expression evaluation
expression language


In expression oriented languages, statements have a value which allows their use in expressions. Blocks of statements usually take the value of the last statement, the value of an expression, or the value of an identified variable. Conditional statements usually take a zero value if the condition fails. A function's value is an identified variable or the argument of a 'return' statement. Statement values reduce the need for global variables since they implicitly return a value, but within expressions they have an ad hoc appearance. In a pure expression language, there are no statements or statement values. In any case, local variables defined within a statement should be inaccessible from outside the statement. (cbb 5/80)
Subtopic: value of a statement block up

Quote: a sequence of statements followed by an expression, has the value of the expression in the statements' context [»redeDH7_1979]
Quote: GPL macro processor can expand an expression into multiple statements [»browPJ_1969, OK]
QuoteRef: ahoAV_1973 ;;845 value of a block is value of output variables after last statement, equiv. if same value.
QuoteRef: browPJ_1969 ;;81 should allow statements within statements -- eg complex add as part of expression

Subtopic: value of conditional up

QuoteRef: cbb_1973 ;;1/9/75 Bliss (Wulf et al 73): if .. then has value of zero if false
Quote: in SL5, if..then..else is an expression whose result is the result of the then.. or else.. part [»hansDR5_1978]
QuoteRef: rainM1_1973 ;;11 can embed case statements in expressions.

Related Topics up

Group: expression evaluation   (5 topics, 97 quotes)
Topic: expression language
(14 items)

Updated barberCB 3/04
Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.