Skip to main content

演算子:列挙型名前空間

演算子は、IEC61131-3規格の拡張です。

列挙型のTYPE名を使用して、列挙型定数に一意にアクセスできます。このようにして、異なる列挙型で同じ定数名を使用できます。

列挙名の前にドット(.)。

<enumeration name>.<constant name>

163.

定数 Blue 両方の列挙のコンポーネントです Colors と列挙 Feelings

color := Colors.Blue;  // Access to coomponent Blue in enumeration Colors

feeling := Feelings.Blue; // Acces to component Blue in enumeration Feelings