Edit Anything

Professional text and hex editing
with Binary Templates technology.

010 Editor - Text/Hex Editor Homepage

Support for a number of different data types is built into 010 Editor. These data types are used when writing a Template (see Declaring Template Variables) or when declaring variables in a Script (see Declaring Script Variables). Commonly, a number of different names refer to the same data type (for example, 'ushort' and 'WORD' usually refer to a 16-bit unsigned integer). The following lists each of the data types and all of the names currently supported for that type:

  • 8-Bit Signed Integer - char, byte, CHAR, BYTE

  • 8-Bit Unsigned Integer - uchar, ubyte, UCHAR, UBYTE

  • 16-Bit Signed Integer - short, int16, SHORT, INT16

  • 16-Bit Unsigned Integer - ushort, uint16, USHORT, UINT16, WORD

  • 32-Bit Signed Integer - int, int32, long, INT, INT32, LONG

  • 32-Bit Unsigned Integer - uint, uint32, ulong, UINT, UINT32, ULONG, DWORD

  • 64-Bit Signed Integer - int64, quad, QUAD, INT64, __int64

  • 64-Bit Unsigned Integer - uint64, uquad, UQUAD, UINT64, QWORD, __uint64

  • 32-Bit Floating Point Number - float, FLOAT

  • 64-Bit Floating Point Number - double, DOUBLE

  • 16-Bit Floating Point Number - hfloat, HFLOAT

  • Date Types - DOSDATE, DOSTIME, FILETIME, OLETIME, time_t, time64_t (for more information on date types see Using the Inspector)

Note that date types can be used in Templates, but they must be cast to an int or float before any operations can be performed on them. Default date and time formats can be set using the Inspector Options dialog. 010 Editor also has support for a special string type.


Other data types can be created using the 'typedef' keyword. The syntax for creating new types is 'typedef <data_type> <new_type_name>'. For example,

    typedef unsigned int myInt;

would generate a new data type myInt for unsigned integers. Typedefs can also be used with arrays (see Arrays and Strings) using the syntax 'typedef <data_type> <new_type_name> [ <array_size> ]'. Note that the array size must be a constant in this case. For example, to generate a new string type with 15 characters use:

    typedef char myString[15];
    myString s = "Test";

Note that typedefs cannot be used to create multi-dimensional arrays (see Template Limitations). Typedefs can also be used with structs (see Structs and Unions).


Use the enum keyword to specify a number of constants for a variable. An enum data type can be created using the C syntax 'enum <type_name> { <constant_name> [ = expression ], ... } <variable_list>'. If no expression is given for the first constant, it is assumed to be zero. If no expression is given for any other constant, its value is assumed to be the previous constant plus one. For example,

    enum MYENUM { COMP_1, COMP_2 = 5, COMP_3 } var1;

would declare the constants COMP_1 equal to 0, COMP_2 equal to 5, and COMP_3 equal to 6. By default, enums are the same type as an integer, but the type can be changed by placing '<' type_name '>' after the enum keyword. For example,

    enum <ushort> MYENUM { COMP_1, COMP_2 = 5, COMP_3 } var1;

would declare the same variable but as an unsigned short. Enums can be useful when writing Templates (see Declaring Template Variables).

This is the manual for 010 Editor, a professional hex editor and text editor. Use 010 Editor to edit the individual bytes of any binary file, hard drive, or process on your machine. 010 Editor contains a whole host of powerful analysis and editing tools, plus Binary Templates technology that allows any binary format to be understood.

Newsletter - Receive special offers, tips, tricks and news. Join now

010 Editor v10.0.1 is here!
What's new?



010 Editor

E-mail: info@sweetscape.com