shivels
2008-08-06 22:10:06 UTC
Hi,
I have written a program which opens a file, converts the contents of the file to hexadecimal and outputs the decimal values. The program works great for giving me the decimal values, but the file also contains readable works like xsize, ysize. All of the readable word lines begin with a comment character, #. I have used the string-to-byte-array to generate the ASCII, but how do I take these values and translate them into works like # xisze, # ysize, ect? The byte array gives me values like 38, 57, 58, 34, but looking at the ASCII table, these values are numebrs like 7,8,0. Is there another conversion I have to do before I can get the corrsponding readable letter?
Adam
I have written a program which opens a file, converts the contents of the file to hexadecimal and outputs the decimal values. The program works great for giving me the decimal values, but the file also contains readable works like xsize, ysize. All of the readable word lines begin with a comment character, #. I have used the string-to-byte-array to generate the ASCII, but how do I take these values and translate them into works like # xisze, # ysize, ect? The byte array gives me values like 38, 57, 58, 34, but looking at the ASCII table, these values are numebrs like 7,8,0. Is there another conversion I have to do before I can get the corrsponding readable letter?
Adam