Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - English


coding of primitives ( wizard stuff )


[numptr] = funptr(name)



a string, the name of a primitive


the internal routine number of the primitive


Utility function (for experts only) to get the internal routine number numptr of the primitive 'name'. numptr is formed from the interface number fun and the routine number fin of the primitive in its interface by numptr = 1000*fun + fin (fin < 1000). From numptr you can get the interface number fun = floor(numptr/1000) which may be useful to link a dynamical interface with arguments passed by reference (see example section).


// Suppose you want to load some codes via the dynamic
// loading facilities offers by addinter. By default
// arguments are passed by values but if you want to
// pass them by reference you can do the following
// (name being the scilab name of one of the interfaced
// routines) :
// addinter(files,spnames,fcts)  // args passed by values
// num_interface = floor(funptr(name)/1000)
// intppty(num_interface)  // args now passed by reference
// Note that if you enter the following
// intppty()
// you will see all the interfaces working by reference

See also

  • clearfun — removes primitive
  • newfun — add a name in the table of functions
  • intppty — set interface argument passing properties
  • addinter — new functions interface dynamic link at run time.
Report an issue
<< external Built-in & external intppty >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Mar 07 09:29:07 CET 2023