ParameterTypes

Methods can be created with parameters of your choice. The types of parameter available are:

Method Paramete Types

Declared as

Description

Parameter Name

field

Name of a field

fldParam#

float

IEEE-standard double-precision (64-bit) floating-point number (double in C++)

dParam#

int

32-bit signed integer

iParam#

int64

64-bit signed integer

i64Param#

list

One of a given enumeration

eParam#

str

ASCII string

csParam#

table

Name of a DecoderScript table

tblParam#

The '#' in the parameter name is replaced by its ordinal (1, 2, 3,… 15) as you can see in the FieldIsBetween example above.

When a method has a field parameter, the caller inserts the name of a field as the actual parameter. The value that arrives in the fldParam# parameter is however the index of that field in the ai64Field array. "-1" is also allowed as an actual field parameter; it means "no field" and the method may treat that as it will. The idea is that it allows a field parameter to be optional.

For an example of how a list parameter is defined and used, see the example in the section on Boolean Methods.