
第十七章
程式介面
I want somebody to share
Share the rest of my life
Share my innermost thoughts
Know my intimate details
Someone who’ll stand by my side
And give me support
And in return
She’ll get my support
She will listen to me
When I want to speak
Depeche Mode, “Somebody”
17.0 導論
Mathematica 是個功能強大的軟體,因此在許多應用上需能與其他程式語言或資料源
(data source)連結。非常幸運地,Mathematica 在設計上便能與第三方程式進行合作,
其基礎是透過 MathLink 進行,MathLink 協定本身便是 Mathematica 的重要核心,因為
它同時也是前端介面與運算核心的溝通管道。Mathematica 以連結物件(
LinkObject
)
代表 傳輸管 道,它 讓 表示 式與 資料值 能傳 遞到運 算核 心或 其他程 式語 言, 例如 C、
Java、.Net 甚至也包含如 Python 等 scripting language。訣竅 17.5、17.6、17.7 與 17.8 將
介紹如何解決與這些語言連結會遇到的問題。[Page-689]
資料庫連結與程式語言一樣占有舉足輕重地位。像 Mathematic