# encvalue

This built-in function is used to encode its argument into a bitstring.

- The function returns bitstring.
- If template is used as parameter in encvalue(), it has to be resolved to a specific value.
- Type of the argument has to have an encoding method explicitly set with its atributes.

Related keywords:

- send
- encode
- decvalue

### encvalue( value_part ) return bitstring;

Example:

type float MyFloat with { encode "RAW" }

var MyFloat f := 1.1;

var bitstring bs := encvalue(f);

This will store the "RAW" encoded form of the float value 1.1 into the bitstring variable bs.

BNF definition of encvalue