how can i get the 16# value from H

edmond
2018-10-02
2018-10-02
  • edmond - 2018-10-02

    i can get the decimal value of 'H',

    VAR   
       ptr:      POINTER TO BYTE;
       byte_value:    BYTE;
       string_value: STRING;
    END_VAR
         ptr:= ADR('H');
          byte_value:=ptr^;
        string_value:=BYTE_TO_STRING(byte_value);
    

    the answer of string_value is '72', which is Decimal of H.
    how can i get string_value = 48.

     

Log in to post a comment.