Quote
Originally posted by Zacha K:
I don't know that much about coding, and stuff, but, since ResEdit's defult editor is the hexidecimal editor, that an EVO editor would access the data forks in hexidecimal format. Keep in mind that everything below is an (educated) guess.
All computer data is a string of 0's and 1's. Resedit displays these 0's and 1's as hex words, but if you read "1111" as 'F' or as '15', it is still the same thing. Because 'Max Speed: FA9B3C' is more or less useless, even though it does represent a number, EV/O reads the data as base-10 integers.
Quote
For each DWRD field in the ResEdit template, there is a four digit hex word. These can go as high as FFFF (which is the hexidecimal) equivilant of 65535). However, ResEdit and EVO, for all practical purposes, only choose to go up to 7FFF (or 32767). Numbers higher than 7FFF are negative (ie, 8000 is -32767, 8001 is negative 32766, and so on, until you get to FFFF being -1).
Yes, your observations are quite estute.
Each digit in hex is made up of four bits. (4 bits) * (4 digits) = 16 bit hex words. As I said before, they can be read as hex words or as integers. Resedit displays them as hex words, but EV/O uses them as base-10 integers.
The bit about the negative numbers deals with Signed (with a + or - sign in front) or Unsigned (always positive) integers. To have a negative number in base-2, you use the first digit as the sign. Signed numbers range from -32767 to 32767, while unsigned numbers range from 0 to 65535. Resedit displays DWRDs as signed numbers, so if you type in a number greater than 32767, it will read it as though it was signed, and the number will be negative when you re-open the resource.
EV/O may be allowing numbers greater than 32767 in some places, but Resedit won't display them as such. Then again, MCB might have just kept everythign signed.
Quote
The RECT fields are, for all practical purposes, just four DWRD fields strung together. Your editor could just access the hexidecimal code in parts of four. Four hexidecimal digits make up a field. If the code is 000F 41AB 375A 09D1, that could be fields with values of 15, 16811, and 2513. Um, yeah, that was pointless.
Right. But you can write code that just writes '15' to the resource, you don't need to fool around with the 000F bit. The bottom line is you're writing "0000000000001111", and as long as you don't drop any zeroes, you're welcome to run around screaming "I have 0x000A fingers!"
-Skyhawk (Look how short my sig is!)
------------------
(url="http://"http://home.maine.rr.com/mithril/")Epsilon(/url)