<< external Built-in & external intppty >>

Scilab Help >> Functions > Built-in & external > funptr

funptr

プリミティブのコーディング ( 上級者向け )

呼出し手順

[numptr] = funptr(name)

引数

name

文字列,プリミティブの名前

numptr

プリミティブの内部ルーチン番号

説明

プリミティブ'name'の 内部的なルーチン番号numptrを取得するためのユーティリティ関数(上級者専用). numptr は,インターフェイス番号 funおよび そのインターフェイス内のプリミティブのルーチン番号 finにより numptr = 1000*fun + fin (fin < 1000) のように計算されます. numptr により, インターフェイス番号 fun = floor(numptr/1000) を得ることができます. この番号は,参照渡しの引数を有する動的インターフェイスにリンクする際に有用です (以下の例を参照).

// 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

参照


Report an issue
<< external Built-in & external intppty >>