I want to have a Scilab function which is able to alter its input variables, For example in `C` I could have

```
void double(int* x){
    *x *= 2;
    return;
}

```

There are `intppty`, `funptr`, `addinter`, `istk`, `sadr` and `stk` in Scilab which seem to be relevant, however I can't find any working example. Scilab does have a `pointer` type (i.e. `128`). I would appreciate if you could help me figure this out.

**P.S.1.** I have also mirrored this question [here on Reddit](https://www.reddit.com/r/learnprogramming/comments/ayolbx/how_pass_variables_by_reference_to_a_scilab/). 

**P.S.2.** Scilab also have `intersci`, `SWIG`, `fort`, `external`, `call`, `API_Scilab`/`gateway` which can interface `C`/`C++` functions or `Fortran` subroutines. Unfortunately `intersci` has been deprecated and `SWIG` seems to be only for Linux with limited `C++` compatibility.

**P.S.3.** scilab has [function overloading](https://help.scilab.org/doc/5.5.2/en_US/overloading.html) which can do stuff with the functions defined by `deff` and a combination of `%`,`<...>`,`_...` syntax.

**P.S.4.** The way `API_Scilab`/`gateway` works, is basically you dvelop the code using functionalities provided bu the header file `api_scilab.h`, compile it with `ilib_build`, write a `loader*.sce` script and then load it with `exec`.

**P.S.5.** supposedly one should be able to install `mingw` compiler with 

```
atomsInstall('mingw'); atomsLoad('mingw');

```

However I am not able to get it to work as I have explained [here](https://stackoverflow.com/questions/55063203/atomsinstall-cant-find-the-mingw-compiler-installed-through-chocolatey).