I receive MSC controls with data into hexadecimal is saved in the character S inside, but now want to parse the data, such as in the first four bytes of data, converted to decimal displayed in the text box, after my program should be how to write? Please guidance!
CodePudding user response:
Val (" & amp; H "& amp; The Left (your - string, 4))
CodePudding user response:
The
refer to the original poster qq_38282143 response: I use MSC controls receive data convert hexadecimal is saved in the character S inside , but now want to parse the data, such as in the first four bytes of data, converted to decimal displayed in the text box, after my program should be how to write? Please guidance! You are the bytecode into it receives "numerical string of hexadecimal representation", save in the string variable again? Now that you are behind the "processing" and needs to be converted to the "value", you might as well put the received data directly in the byte array, Behind to handle still far more convenient, also far than you use string turn to turn to run far more efficient! CodePudding user response:
refer to the original poster qq_38282143 response: I receive MSC controls with data into hexadecimal is saved in the character S inside, but now want to parse the data, such as in the first four bytes of data, converted to decimal display in the text box, after my program should be how to write? Please guidance! convert hexadecimal MSC controls to receive data stored in a character's, needs to take an examination of the original data are byte value convert hexadecimal characters form after joining together the hexadecimal string, so how to parse need the original data of actual data types, integers, floating point Numbers to have specific code realization, such as But need to consider receive bytes of high and low order to transform,