<< MASCARET_getString Toolbox Mascaret MASCARET_getVersion >>

Toolbox Mascaret >> Toolbox Mascaret > MASCARET_getTypeVar

MASCARET_getTypeVar

Accessor for retrieving information on a variable

Calling sequence

[error,typeVar,category,modify,dimVar]=MASCARET_getTypeVar(id,nomVar)

Arguments

error

(Output argument) Error code value : zero indicates that no errors occurred

typeVar

The type of a variable (real, integer, boolean, string)

Possible values :"INT" or "DOUBLE" or "BOOL" or "STRING" or "TABINT" or "TABDOUBLE" or "TABBOOL"

category

The category of a variable (model or state)

Possible values : "MODEL" (model) or "STATE" (state)

modify

Tells if a variable can be modified by using a function setXxxxxMascaret with the variable

At the present all the variables are alterable, thus this parameter has no effect

dimVar

Dimension of a variable

The index number from 0 to 3 that comes with the functions getXxxxxMascaret and setXxxxxMascaret)

id

Identification number of the MASCARET instance returned by MASCARET_create

nameVar

Name of the variable (dot notation), the list of all the possible variables is returned by MASCARET_getDescVar

Description

Accessor for retrieving information on a variable

Example

// creation of the MASCARET model
[err, id] = MASCARET_create();
assert_checktrue(id>0);

// get all the descriptions
[err,TabVar,TabDesc]=MASCARET_getDescVar(id);
assert_checkequal(err,0);

// get one description
[err,varType,category,modify,dimVar]=MASCARET_getTypeVar(id,TabVar(2));
assert_checkequal(err,0);   
disp(varType);
disp(category);
disp(modify);
disp(dimVar);

// model deletion
err = MASCARET_delete(id);
assert_checkequal(err,0);

See also


Report an issue
<< MASCARET_getString Toolbox Mascaret MASCARET_getVersion >>