A NextProtocol Method produces a number and stores it into the variable i64Output. Here is the simplest example where the code is extracted from a named field:
NEXT_PROTOCOL
METHOD FromField
/* obtains the value in a named field */
CODE
i64Output = ai64Field[fldParam1];
ENDCODE
PARAM "Field that contains the next protocol" field