The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
The assign parameter to many NATS and CARMA functions lets you
change output variable names. For example, the NATS4 template
function, nats_decode, creates the following variable by
default:
Unfortunately, if you already have a Smarty variable named $encoded when you call nats_encode, the new value overwrites the old value. We designed assign to solve this problem. Call nats_encode with an argument to the assign parameter to have
its output placed in the variable named by your argument. For example: the following code,
- {nats_encode assign="my_variable"}
puts the output in,