Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> call_scilab API > call_scilab

call_scilab

call_scilabは, C/C++コードからScilabエンジンをコールする機能を提供する インターフェイスです.

説明

Scilabはネーティブな(C/C++)アプリケーションからコールできる 可能性を提供します.

このモジュールにより, 他のコード/アプリケーションからScilabの機能をインターフェイスする ために, または,他の言語からScilabの機能をインターフェイスできるようにする ために, C/C++からScilabをコールできるようになります.

Scilab 5.2.0以降, 全てのScilabデータ型をcall_scilabで 処理できるようになりました. これは,API_Scilabにより 行われました.

このヘルプは,call_scilab APIの機能を説明します.

注意: javasci モジュールは call_scilabに基づいています.

注意: 古いAPI (stackX.h) はScilab 6.0以降では利用できません.

// 簡単な call_scilab の例
#include <stdio.h> /* stderr */
#include "api_scilab.h" /* Scilabメモリにアクセスする関数を提供 */
#include "call_scilab.h" /* Scilabエンジンをコールする関数を提供 */
// Filename: simple_call_scilab.c
int main(void)
{
/****** 初期化 **********/
#ifdef _MSC_VER
 if ( StartScilab(NULL,NULL,NULL) == FALSE )
#else
 if ( StartScilab(getenv("SCI"),NULL,NULL) == FALSE )
#endif
  {
   fprintf(stderr,"Error while calling StartScilab\n");
   return -1;
  }
/****** 実際のScilabタスク *******/
 SendScilabJob("myMatrix=['sample','for the help']");
 SendScilabJob("disp(myMatrix);"); // !sample  for the help  !を表示します
 SendScilabJob("disp([2,3]+[-44,39]);"); // - 42.    42.  を表示します
/****** 終了 **********/
 if ( TerminateScilab(NULL) == FALSE ) {
  fprintf(stderr,"Error while calling TerminateScilab\n");
  return -2;
 }
 return 0;
}

履歴

バージョン記述
5.4.0 新規メソッドを追加:
  • CallScilab.h が削除されました (Scilab 5.2.0以降で廃止). call_scilab.hで置換されました.
  • 関数 int getLastErrorValue(void); が追加されました. Scilabで生成された直近のエラーコードを返します.
  • 関数 const char* getLastErrorMessageSingle(); が追加されました. Scilabで生成された直近のエラーメッセージを返します.
  • call_scilab.hの廃止された関数を削除: C2F(readmat), C2F(creadmat), C2F(creadbmat), C2F(creadcmat), C2F(readchain), C2F(creadchain), C2F(creadchains), GetLengthStringMatrixByName, C2F(matptr), C2F(cmatptr), C2F(cmatcptr), C2F(cmatsptr), C2F(cmatbptr), getlengthchain

参照

  • api Scilab — api_scilab はScilabメモリにデータを読み書きするための Scilabインターフェイスです
  • Compile and run with call_scilab — How to compile a native application based on or using Scilab
  • Matrix Management — How to manage Scilab's variable read and write process using call_scilab and api_scilab
  • Boolean Management — How to manage Scilab's boolean read and write process using call_scilab and api_scilab
  • Complex Management — How to manage Scilab's complex variable read and write process using call_scilab
  • String Management — How to manage Scilab's String read and write process using call_scilab and api_scilab
Report an issue
<< Boolean management call_scilab API Compile and run with Call Scilab >>

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:
Thu Feb 14 15:02:38 CET 2019