Variable assignments are of the form $var=expression. Variable assignments can appear either before a command, or between values in the send command.
Variable references are of the form $var, and can appear anywhere where an integer number or a dotted quad could be used, except in a tc, insmod, or preload command.
Example:
#define foo(params) \ $answer=42 params \ $answer $value send foo($value=5) send foo($value=10 $answer=8)
yields the following two packets:
2a05 080a