setarrval
setarrval |
Purpose
Synopsis
int setarrval(XPRMcontext ctx, XPRMarray array, const int indices[], XPRMalltypes *value)
int setarrvalint(XPRMcontext ctx, XPRMarray array, const int indices[], int valint)
int setarrvalreal(XPRMcontext ctx, XPRMarray array, const int indices[], double valreal)
int setarrvalstr(XPRMcontext ctx, XPRMarray array, const int indices[], const char *valstr)
int setarrvalbool(XPRMcontext ctx, XPRMarray array, const int indices[], int valint)
Arguments
ctx
|
Mosel's execution context
|
array
|
Reference to an array
|
indices
|
n-tuple of indices where
n is the number of dimensions of the array
array
|
value
|
Reference to a value
|
valint
|
An integer value
|
valreal
|
A real value
|
valstr
|
A text string
|
Return value
0 if executed succesfully, a positive value otherwise.
Further information
1. These functions set the value of an array entry that corresponds to a given tuple of indices for the given array.
2. The first form of this function selects the right value type (integer, real, string or boolean) based on the type of the array. If applied to an array of any other type, the reference to the object is returned in the
value parameter and the function returns 2.
3. When
setarrvalstr is applied to an array of a type published by a module, it uses
dsotypfromstr for performing the assignment.
Related topics