Function ScalarValue(identifier, suffix)

ScalarValue

ScalarValue(
    identifier,   ! (input) element expression into AllIdentifiers
    suffix        ! (optional) element expression into AllSuffixNames
   )

Arguments

identifier

A scalar element expression into AllIdentifiers

suffix

A scalar element expression into AllSuffixNames

Return Value

The function ScalarValue returns the value contained in the scalar identifier identifier or scalar reference identifier.suffix.

Example

Given the declarations inside module elementary::arithmetic::funcScalarValue:

DeclarationSection scalar_value_global_declarations {
    Parameter p_rev;
    Parameter p_cst;
    Parameter p_pct;
    Parameter p_cap;
}

Then the code:

p_rev := 12 ;
p_cst := 34 ;
p_pct := 56 ;
p_cap := 78 ;
_s_kpis := scalar_value_global_declarations ;
_p_kpiVal(_i_kpi) := ScalarValue( _i_kpi );
block where single_column_display := 1;
    display _p_kpiVal ;
endblock ;

Will put the following table in the listing file:

_p_kpiVal := data
{ 'elementary::arithmetic::funcScalarValue::p_rev' : 12,
  'elementary::arithmetic::funcScalarValue::p_cst' : 34,
  'elementary::arithmetic::funcScalarValue::p_pct' : 56,
  'elementary::arithmetic::funcScalarValue::p_cap' : 78 } ;

Note

When identifier or identifier.suffix is not a scalar numerical valued reference, the function ScalarValue returns 0.0.

See also

The function Val. The ScalarValue function is a function that operates on subsets of AllIdentifiers. Other functions that operate on subsets of AllIdentifiers are referenced in Working with the Set AllIdentifiers of the Language Reference.