You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
riederm
changed the title
CONSTANTS - FunctionBlock instances cannot be declared in CONSTANT blocks
Constants - FunctionBlock instances cannot be declared in CONSTANT blocks
Sep 22, 2021
fb-instances and class-instances cannot be declared
as constants.
the implementation does not allow to declare a const
of type FB or Class, an array of FBs or Classes
or a struct that contains a field of type FB or
Class.
Furthermore the DataTypeInformation::Struct now contains
a new field: 'source' that indicates where this struct
comes from. It is either an original Declaration
(TYPE x : STRUCT ... END_TYPE) or it was generated
from a POU(PouType). With this field it is now very
easy to see what a DataType offers (is it an FB or Class,
can I call it, etc.)
closes#295
…ressions #292) (#306)
* validate illegal fb and class consts
fb-instances and class-instances cannot be declared
as constants.
the implementation does not allow to declare a const
of type FB or Class, an array of FBs or Classes
or a struct that contains a field of type FB or
Class.
Furthermore the DataTypeInformation::Struct now contains
a new field: 'source' that indicates where this struct
comes from. It is either an original Declaration
(TYPE x : STRUCT ... END_TYPE) or it was generated
from a POU(PouType). With this field it is now very
easy to see what a DataType offers (is it an FB or Class,
can I call it, etc.)
closes#295
* add scope to unresolved const expressions
the additional scope parameter in const_evaluator::evaluate(...)
helps the evaluator to distinguish between global constants and
POU-local ones. When resolving const expressions the given
scope will be used to resolve references.
therefore every ConstExpression holds an optional scope when it
is registered (see enum ConstExpression).
closes#292
see chapter 6.5.2.1 of the norm
The text was updated successfully, but these errors were encountered: