Creating dynamic members

One very convenient (but advanced) feature are the dynamic fields. A member is called dynamic if its length is not constant but depends on other field. This can be accomplished by entering in the count field the name of the field, which defines the length of the record, i.e.:
Field5=60,Data,hex,field2
This will tell the template editor that the length of the 5th member is equal to the value that the 2nd field has. You can perform a number of operations on the dynamic count:
Field5=60,Data,hex,field2!-2
From the value of the 2nd field, subtract 2 and this will be the length of the field. The supported operations on the dynamic field are summarized in the table below:

Operation Description
+ Addition
- Subtraction
* Multiplication
/ Division
\ Integer division
^ Power
% Modulus

Back.