Accessor for retrieving a boolean variable
[error,value]=MASCARET_getBool(id,nameVar,index1,index2,index3)
(Output argument) Error code value : zero indicates that no errors occurred
Boolean value (integer value indeed : 1 ->TRUE, 0 ->FALSE) of a variable with the specific indices
Identification number of the MASCARET instance returned by MASCARET_create
Name of the variable (dot notation), the list of all the possible variables is returned by MASCARET_getDescVar
value of the 1st index
value of the 2nd index
value of the 3rd index
Accessor for retrieving a boolean variable of the model or of the state
toolbox_dir=getenv("toolbox_dir"); c = filesep(); // creation of the MASCARET model [err, id] = MASCARET_create(); assert_checktrue(id>0); // read data from files path_xml = "file://"+toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1.xcas"; TabNomFichier = [strsubst(path_xml,'\','/'), .. toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1.geo", .. toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1_0.loi", .. toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1_1.loi", .. toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1.lis", .. toolbox_dir+c+"demos"+c+"Help"+c+"demo1"+c+"demo1.opt"]; TypeNomFichier = ["xcas","geo","loi","loi","listing","res"]; impression = 0; err = MASCARET_importModel(id,TabNomFichier,TypeNomFichier,impression); assert_checkequal(err,0); // check if the computation was implicit [err,Implicit] = MASCARET_getBool(id,"Model.ImpSupCritKern",0,0,0); assert_checkequal(err,0); disp(Implicit,"Implicit calculation? : "); // model deletion err = MASCARET_delete(id); assert_checkequal(err,0); | ![]() | ![]() |