shilpashetty27
Technical User
Hi all,
I’m trying to read the contents of a text file and attempting to compare each content with a particular number in a pre-defined array. I’m unable to proceed as I’m stuck with how I can read contents that are specified in various formats. For eg: below is a sample of how the contents of the file look like:
R [20][00][00][20] // This is the first line
R [21][00][00][40][00][01][00] // This is the second line
How can I read the first character that is, R, in this case, followed by [20] followed by [00] and so on. Please note the values in square brackets are in hex format.
Any ideas on how I can proceed are appreciated.
Thanks in advance!
Shilpa
I’m trying to read the contents of a text file and attempting to compare each content with a particular number in a pre-defined array. I’m unable to proceed as I’m stuck with how I can read contents that are specified in various formats. For eg: below is a sample of how the contents of the file look like:
R [20][00][00][20] // This is the first line
R [21][00][00][40][00][01][00] // This is the second line
How can I read the first character that is, R, in this case, followed by [20] followed by [00] and so on. Please note the values in square brackets are in hex format.
Any ideas on how I can proceed are appreciated.
Thanks in advance!
Shilpa