update api_scilab documention with changes on pvApiCtx
[scilab.git] / scilab / modules / api_scilab / help / en_US / double / F_doubleExample.xml
index 313d323..182876a 100644 (file)
@@ -27,7 +27,8 @@
     <!--Lib_name: doubleExample-->
     <!--Func_list: doubleExample-->
     <title>Gateway Source</title>
-    <programlisting role="code_gateway"><![CDATA[ 
+    <programlisting role="code_gateway">
+        <![CDATA[ 
 #include "api_scilab.h"
 
 int doubleExample(char *fname,unsigned long fname_len)
@@ -49,13 +50,13 @@ int doubleExample(char *fname,unsigned long fname_len)
 
        if(isEmptyMatrix(pvApiCtx, piAddr))
        {
-               iRet = createEmptyMatrix(pvApiCtx, nbInputArgument + 1);
+               iRet = createEmptyMatrix(pvApiCtx, nbInputArgument(pvApiCtx) + 1);
                if(iRet)
                {
                        return iRet;
                }
 
-               AssignOutputVariable(1) = 0;
+               AssignOutputVariable(pvApiCtx, 1) = 0;
        }
        else if(isDoubleType(pvApiCtx, piAddr))
        {
@@ -72,7 +73,7 @@ int doubleExample(char *fname,unsigned long fname_len)
                                        return iRet;
                                }
 
-                               iRet = createScalarComplexDouble(pvApiCtx, nbInputArgument + 1, dblReal, dblImg);
+                               iRet = createScalarComplexDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, dblReal, dblImg);
                                if(iRet)
                                {
                                        return iRet;
@@ -86,7 +87,7 @@ int doubleExample(char *fname,unsigned long fname_len)
                                        return iRet;
                                }
 
-                               iRet = createScalarDouble(pvApiCtx, nbInputArgument + 1, dblReal);
+                               iRet = createScalarDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, dblReal);
                                if(iRet)
                                {
                                        return iRet;
@@ -109,7 +110,7 @@ int doubleExample(char *fname,unsigned long fname_len)
                                        return sciErr.iErr;
                                }
 
-                               sciErr = createComplexMatrixOfDouble(pvApiCtx, nbInputArgument + 1, iRows, iCols, pdblReal, pdblImg);
+                               sciErr = createComplexMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iRows, iCols, pdblReal, pdblImg);
                                if(sciErr.iErr)
                                {
                                        printError(&sciErr, 0);
@@ -125,7 +126,7 @@ int doubleExample(char *fname,unsigned long fname_len)
                                        return sciErr.iErr;
                                }
 
-                               sciErr = createMatrixOfDouble(pvApiCtx, nbInputArgument + 1, iRows, iCols, pdblReal);
+                               sciErr = createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, iRows, iCols, pdblReal);
                                if(sciErr.iErr)
                                {
                                        printError(&sciErr, 0);
@@ -134,7 +135,7 @@ int doubleExample(char *fname,unsigned long fname_len)
                        }
                }
 
-        AssignOutputVariable(1) = nbInputArgument + 1;
+        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1;
        }
 
        return 0;