Warning when using ROL function

Johan
2010-11-27
2010-12-04
  • Johan - 2010-11-27

    Hi
    I use the "ROL" function but gets a warning (1510) that I should use "Typed Literal". How do I do that on a variable that its not a constant?

    Example code:

    VAR
    Β  Β STATUS:WORD:=16#0;
    END_VAR
    STATUS:=ROL(8,STATUS);
    

    Regards
    Johan

     
  • Ralph Holz - 2010-11-29
    Status:= ROL(Status,8)
    
    ``` --> means Status is rotated by 8
    

    Status:= ROL(WORD#8,Status)

    ``` --> means 8 is rotated by Status

    br
    Ralph

     
  • Johan - 2010-12-04

    My mistake, sorry.

     

Log in to post a comment.