warning C0195

gatto
2 days ago
2 days ago
  • gatto

    gatto - 2 days ago

    Good morning dear codesys users.
    I'm using 3.5.20.40 and I get this warning C0195 when I assign an initial value to xyz.
    However, if I do it on a single byte (abc), it doesn't display any warning.
    Why?

    VAR_GLOBAL
        abc : BYTE := 100 ;
        xyz : ARRAY [1..10] OF BYTE := [10(100)] ;
    END_VAR
    
     
  • gatto

    gatto - 2 days ago

    I answer myself:
    xyz : ARRAY [1..10] OF BYTE := [10(BYTE#100)] ; // no warning :-)

     

    Last edit: gatto 2 days ago

Log in to post a comment.