%IF_HAS_type%

Includes the line if and only if there are type signals. type can be any of BOOL, INT and REAL.

If this key is found in a line of the template file during code generation, then that whole line will only be processed if the number of variables of type type is greater than 0. This is useful for avoiding declarations of arrays with zero elements, which is forbidden in some target languages.

Generators

C/C++/Java, VHDL

Example (Java)

%IF_HAS_REAL%   public float[] %REAL_VECTOR% = new float[%NUMBER_REAL%];