Read a Variable dialog

Use the Read a Variable dialog to define a variable that reads an integer. It is launched in the New Custom File Type or Edit Custom File Type dialogs by selecting Add > Read a Variable.

On this dialog you can:

  • Set the name of the variable.
  • Set the integer size in bytes. 1, 2, 4, and 8 are the available options.
  • Set an endian format option for the integer value:

    Endian format does not apply to 1 byte integers.

    Little endian – Low-order byte is stored at the lowest address, and the high-order byte at the highest address.
    Big endian – High-order byte is stored at the lowest address, and the low-order byte at the highest address.

  • Set a Reference Point from where the system is to start its search for the integer:
    The beginning of the file – Search starts from the beginning of the file (Byte 0).
    The current file position – Search starts at the current position of the Reference Point.
    The end of the file – Search starts after the last byte in the file. If this Reference Point is selected, you must use a negative offset.

    If the integer is found, the current position is changed to the first byte after the integer.

  • set an offset value to have the system search for the integer from a particular location in the file:
    Use this offset – Enter a value that represents the number of bytes from the Reference Point that the system should read the integer value to the variable from. Negative values go left from the Reference Point.
    Use the offset in this variable – Select the value contained in a pre-defined variable to set the length of the byte range from the current position, where the system is to search for the integer value to be saved in the variable.

Related Information:

Related Tasks: