
17.5 呼叫 Java 函式
|
695
此 範 例 介 紹
MLPutInteger32List
指 令, 它 將 C 陣 列 資 料 輸 出 為 Mathematica 串 列。
MathLink API 中包含了許多相關指令,作為不同型態資料的輸出,例如整數、字串、串
列與多維陣列等資料。此外,本例亦介紹了 mprep 的樣板描述檔案可與樣板指令混用。
另一個常見的需求,是希望在安裝 MathLink 程式前先執行初始程式。C 語言的初始程
式可於
main()
或
WinMain()
函式中設置,然而 Mathematica 可否做到?其典型例子就
是安裝函式的使用說明,此時可使用 mprep 的
:Evaluate:
設置規格。詳見
http://bit.ly/
duSEnb
所提供的範例。
延伸資訊
設 定 C 語 言 環 境 的 相 關 資 訊,Mac OS X 作 業 系 統 請 參 考
tutorial/
MathLinkDeveloperGuide-MacintoshOverview
,Windows 作 業 系 統 請 參 考
tutorial/
MathLinkDeveloperGuide-WindowsOverview
,Unix 與 Linux 作 業 系 統 請 參 考
tutorial/
MathLinkDeveloperGuide-UnixOverview
。
Mprep 相關資訊,請參考 Mathematica 教學文件
ref/program/mprep
。[Page-700]
17.5 呼