Menu

keywords-expression

Will Pittenger

Expression parameters are like var parameters, except the actual expression in the call is what's passed. Any reference to the parameter's identifier causes the expression to be reevaluated. Type modifiers aren't allowed with this type of parameter. They are especially useful with complex statements. They serve the same function as lambdas doe in select circumstances in C#. Be careful with expression variables. Because they are evaluated each time you reference them, if they contain calls the the ++ or -- operators, you might get unexpected results. Consider using something else for all procedure types other than complex statements. With complex statements, only reference them once per loop. Expressions can't be anything other than parameters.

:::text
``Whatever goes before the parameter`` \expression\ /TypeDescriptor/ identifier ``Whatever goes after the parameter``

Note: The value passed to the expression doesn't end until the parser reaches the end of the line or it encounters a keyword that can't be part of the expression. For what you can put where /TypeDescriptor/ appears, see Type descriptors.


Related

Wiki: Keywords
Wiki: keywords-readonly
Wiki: keywords-ref
Wiki: keywords-var
Wiki: keywords-volatile
Wiki: operators-brackets
Wiki: operators-can-be-null
Wiki: operators-dec
Wiki: operators-inc