Magic OperatorsJ

print
日本語

魔法の演算子


数式解析



数式の解析 parse(<string>):


説明: この演算子(関数)は、文字列を解析して数式として評価します。この演算子はユーザーが入力した文字列を解析するのに役立ちます。

例:

文字列評価結果
parse("3+7") 10


コードの例

text="sin(x)+cos(x)";
f(x):=parse(text);


関数 f(x)sin(x)+cos(x) として解釈され定義されます。

Contributors to this page: Akira Iritani .
Page last modified on Friday 22 of July, 2011 [12:18:34 UTC] by Akira Iritani.

The content on this page is licensed under the terms of the License.


Menu