Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Hex editing?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Carey




PostPosted: Thu Nov 01, 2007 10:57 am   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Thu Nov 01, 2007 11:02 am   Post subject: 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




PostPosted: Thu Nov 01, 2007 11:24 am   Post subject: Re: Hex editing?

or perhaps even easier using remainders and quotients! Smile
Carey




PostPosted: Thu Nov 01, 2007 11:46 am   Post subject: Re: Hex editing?

some of the symbols that hex values produce Turing can't handle and gives an error.
Mazer




PostPosted: Thu Nov 01, 2007 6:45 pm   Post subject: Re: Hex editing?

Carey @ Thu Nov 01, 2007 11:46 am wrote:
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




PostPosted: Fri Nov 02, 2007 11:40 am   Post subject: Re: Hex editing?

Mazer @ Thu Nov 01, 2007 6:45 pm wrote:
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




PostPosted: Fri Nov 02, 2007 1:28 pm   Post subject: RE:Hex editing?

And you are using read/write instead of get/put?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: