Sets the contract context.
Syntax
tdr.SetContractDef( ctx )
Syntax Elements
- ctx
- Parameter type: raw
An opaque sequence of bytes that can be retrieved by the table operator.
Usage Notes
This function is valid only if called from the contract function.
An error is raised if the function is called from the table operator.
Example: Set the Contract Context
The following statements illustrate how this function can be used in the contract function:
- A data structure is created.
- The structure is serialized.
- The serialized version of the structure is set as the contract context.
myctx <- list( division="appliances", codes=c(10, 34) ); myctxS <- serialize( myctx, NULL ); tdr.SetContractDef( myctxS );