From contact at pierre-vuillemin.fr Tue Sep 1 10:31:27 2015 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Tue, 01 Sep 2015 10:31:27 +0200 Subject: [Scilab-Dev] Overloading operator "=" In-Reply-To: <55DF2AC0.1010000@free.fr> References: <26e0a2a44092f6bb9e7a7eae1201955b@pierre-vuillemin.fr> <55DF2AC0.1010000@free.fr> Message-ID: Great, thank you. Le 27.08.2015 17:20, Samuel Gougeon a ?crit?: > Hello, > Le 25/08/2015 14:41, Pierre Vuillemin a ?crit : >> .../... >> And a side question : can anyone create a project on the scilab forge? > You may have a look there: > http://forge.scilab.org/index.php/help/#q-newproject > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From stephane.mottelet at utc.fr Tue Sep 15 16:31:08 2015 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 15 Sep 2015 16:31:08 +0200 Subject: [Scilab-Dev] regression with AssignOutputVariable in scilab 6 Message-ID: <55F82BAC.9030003@utc.fr> Hello, I have noted a different behaviour of same gateway code between scilab 5.5.2 and scilab 6. The statement AssignOutputVariable(pvApiCtx, 1) = 1; is supposed to allow to return as first output variable the first input variable of the scilab function. Under scilab 5.5.2 the following code allows to modifiy the non-zeros terms of a sparse matrix a with elements of a vector v (with the syntax spset(a,v)), and outputs the modified matrix: int sparse_set(char *fname) { SciErr sciErr; int i,j,k; int* piAddr = NULL; int* vAddr = NULL; int iRows = 0; int iCols = 0; int viRows = 0; int viCols = 0; int iNbItem = 0; int* piNbItemRow = NULL; int* piColPos = NULL; double* pdblReal = NULL; double* vpdblReal = NULL; CheckInputArgument(pvApiCtx, 2, 2); CheckOutputArgument(pvApiCtx, 0, 1); sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr); sciErr = getSparseMatrix(pvApiCtx, piAddr, &iRows, &iCols, &iNbItem, &piNbItemRow, &piColPos, &pdblReal); sciErr = getVarAddressFromPosition(pvApiCtx, 2, &vAddr); sciErr = getMatrixOfDouble(pvApiCtx, vAddr, &viRows, &viCols, &vpdblReal); memcpy(pdblReal, vpdblReal,min(iNbItem,viRows*viCols)*sizeof(double)); AssignOutputVariable(pvApiCtx, 1) = 1; return 0; } Under Scilab 6 (function prototype has to be updated ;-)), the same code outputs the original, unmodified matrix a. My question is : is the (expected) behavior of scilab 5.5.2 erroneous or is there a bug/regression in scilab 6 ? Thanks for help S. -- D?partement de G?nie Informatique EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable Universit? de Technologie de Compi?gne - CS 60319 60203 Compi?gne cedex