Hex Editor
Hex Editor - Binary File Editing Software for Windows

read Attribute

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >

Syntax:

read(expr)
      

Allows you to change the way this field is read by the Structure Viewer. You may specify expression to be evaluated each time Structure Viewer accesses the field's value.

Take the following notes into consideration:

  • Your expression will be evaluated each time the field's value is read from the document, even during binding.
  • Hex Editor Neo caches field values. This means that the result of your expression must be persistent. That is, for any x and y, if x == y, expr(x) == expr(y).

In expression you may refer to actual field's value using a special variable _1:

struct A
{
    // The following field stores the size of the array minus 2
    [read(_1+2)]
    int array_size;   // will be displayed as actual value + 2
    char array[array_size];
};
      
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.