BjAlvestad / vscode-simatic-scl

VS Code extensions for the SCL language used in TIA Portal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assignment of UDT and Array in declaration

BjAlvestad opened this issue · comments

UDTs can be assigned to by enclosing in brackets, and entering values in

Examples of valid assignments, that is not yet covered in our parsing:

 // UDT consisting of three arrays of DWORDs, each with length 1.
:= ([()], [()], [16#0051])

// Array of UDTs:
 := [((), (), (), ()), ((), 0, 0, ()), ((), 0, 0, 0)]
 
 Array[0..0] of DWord := [2#0000_0000_0000_0000_0001_0100_0011_1111]

 // Writing to array element index(value)
 Array[1..32] of Int := [32(100)]