
-----------------------------------
Carey
Thu Nov 01, 2007 10:57 am

Hex editing?
-----------------------------------
Is there way in Turing to get a hexadecimal representation of data from a file? For and example check out Winhex. I'm also interested in writing hex values. Ex. write the value 28 and get a ' in the file. Any help would be appreciated.

-----------------------------------
Mazer
Thu Nov 01, 2007 11:02 am

RE:Hex editing?
-----------------------------------
Hexadecimal is just a different numbering system, like decimal and binary. Learn to convert between these systems (actually, it's pretty easy with Turing using intstr and strint) and perhaps how to read binary data from files.

-----------------------------------
Ultrahex
Thu Nov 01, 2007 11:24 am

Re: Hex editing?
-----------------------------------
or perhaps even easier using remainders and quotients! :)

-----------------------------------
Carey
Thu Nov 01, 2007 11:46 am

Re: Hex editing?
-----------------------------------
some of the symbols that hex values produce Turing can't handle and gives an error.

-----------------------------------
Mazer
Thu Nov 01, 2007 6:45 pm

Re: Hex editing?
-----------------------------------
some of the symbols that hex values produce Turing can't handle and gives an error.
0-F? I haven't experienced any trouble with those in any Turing program.

-----------------------------------
Carey
Fri Nov 02, 2007 11:40 am

Re: Hex editing?
-----------------------------------
0-F? I haven't experienced any trouble with those in any Turing program.

obviously not. I'm talking about the character that the number produces (ex 28 = '). Well some of the values don't work out that nicely and Turing gives an "illegal character in string" message, when i try to process them. Also it gives the same error when I try to read them from a file.

-----------------------------------
Mazer
Fri Nov 02, 2007 1:28 pm

RE:Hex editing?
-----------------------------------
And you are using read/write instead of get/put?
