< Scratch File Format (1.4)

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
SandCastleIcon.png This page has links to websites or programs not trusted by Scratch or hosted by Wikipedia. Remember to stay safe while using the Internet, as we can't guarantee the safety of other websites.
This is part of a technical description of the file format.

Inline values — nil, true, false, integers, and floats — are simply encoded inline as fields in Objects in an Object Table.

Note: References are also found as Object fields, although they are not inline values.

List of Inline Values

classID, type Squeak Function, structure
1: nil n/a (constant value)
2: true n/a (constant value)
3: false n/a (constant value)
4: SmallInteger SmallInt - signed 32-bit integer
5: SmallInteger16 SmallInt - signed 16-bit integer
6: LargePositiveInteger length: 16-bit integer, followed by that many bytes.
7: LargeNegativeInteger (same as above)
8: Float 8 bytes
"Squeak function" refers to the function in the Squeak source code used to parse that type (eg. getSmallInt, putSmallInt.)