Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Resource fork
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Data types == The smallest elements making up a resource fork are called data types. There are several data types. After a resource fork is accessed, its contents can be found by reading it in as appropriate for the data types defined in advance. Placing definitions inside the program stating how data is to be treated makes it possible to store resources called TMPL resources as well. Using this method increases the visibility of the data when viewed with a program such as ResEdit, making later editing simpler. As the Macintosh platform originated with Motorola-based processors (68k and PPC), the data is serialized to disk in [[endianness|big-endian]] format. The following is a list of the major data types, in alphabetical order. {| class="wikitable" |- ! style="text-align:left" | Data type || actual name || style="text-align:left" |Description |- | BBIT || binary bit||Represents a single Boolean bit (true or false). Normally the number of BBITs must be a multiple of 8. |- | BOOL || Boolean||Represents a Boolean value. It consists of 2 bytes; 256 is true, and 0 is false. |- | CHAR || character||Represents a one-byte character. |- | CSTR || C string||Represents a string of the form used in the [[C (programming language)|C programming language]]: a [[null-terminated string]] of bytes. |- | DLNG || decimal long word integer||A decimal long word (4 byte integer). Represents values between approximately β 2.1 billion and 2.1 billion. |- | HEXD || hex dump||Indicates that the data from this position to the end is hexadecimal. This is used to represent code resources or compressed data. |- | HLNG || long word hexadecimal||This data is treated as a 4 byte hexadecimal value. It is used, among other things, to represent integers greater than 2.1 billion, such as unsigned long values in C. |- | PSTR || Pascal string||Represents a Pascal string, with the first byte giving the length of the string. |- | TNAM || type name||A string representing a value such as a [[creator code]], which is always 4 bytes long. |- | RECT || rectangle||Represents the coordinates of the corners of a rectangle (top, left, bottom, right). Always 8 bytes long. |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)