Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Modules | Functions
SVM parameters

This module contains API functions to handle SVM parameters. More...

## Modules
| SVM value parameters
| This module contains API functions to handle SVM value parameters.
| SVM marker parameters
| This module contains API functions to handle SVM marker parameters.
| SVM keyword parameters
| This module contains API functions to handle SVM keyword parameters.
| SVM structure parameters
| This module contains API functions to handle SVM structure parameters.
| SVM variable parameters
| This module contains API functions to handle SVM variable parameters.

## Functions
SVM_FUNCTION SVM_Parameter * | svm_parameter_array_new (const void *svm, const SVM_Size argc)
| This function creates an array of parameters.

## Detailed Description

This module contains API functions to handle SVM parameters.

Parameters are special variables used as interface to pass data in instruction and function calls:

- In instruction plugin callback functions, parameters are generated by the virtual machine from the arguments evaluated in the SVM code,
- In function plugin callback functions, parameters are generated by the plugin callback calls,
- In order to pass parameters to functions, an array of parameter has to be created and passed to the proper API function.

## Function Documentation

## ◆ svm_parameter_array_new()

SVM_FUNCTION SVM_Parameter * svm_parameter_array_new | ( | const void * | svm,
|  | const SVM_Size | argc
| ) |  |

This function creates an array of parameters.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | argc | The size of the array.

Returns
  A pointer to a C array of SVM_Parameter. Every cell of the array has to be initialised by a parameter before being passed to an API function.

Note
  The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)