istk — Return a pointer to an integer to access data stored at a given position in the Scilab memory
istk(l_stack_pos)
the position in the Scilab memory of the parameter to be accessed (input argument)
This C gateway function returns a pointer to an integer to access data stored at a given position in the Scilab memory.
WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use API Scilab (the new Scilab API).
#include <stack-c.h> int sci_myones(char * fname) { int m_row, n_col, l_pos; m_row = 1; n_col = 1; // We create a scalar CreateVar(1, MATRIX_OF_INTEGER_DATATYPE, &m_row, &n_col, &l_pos); *istk(l_pos) = 1; // We store the value 1 in the memory allocated for output // parameter 1 LhsVar(1) = 1; return 0; }