interpreter_processfile

指定されたスクリプトファイルを実行します。


taiseiue | 2021-11-19

定義

名前空間: Alice.Interpreter
アセンブリ: Losetta.dll
ソースコード: Alice.Interpreter.cs

interpreter_processfile(string,bool)

指定されたスクリプトファイルをトップレベルのスクリプトとして実行します。 現在のスクリプトにファイルを読み込むincludeとは異なります。

AliceScript
namespace Alice.Interpreter;
public variable interpreter_processfile(string path,bool mainFile=false);
引数
path 実行するスクリプトファイルのパス。
mainFile メインファイルとして評価する場合はtrue、それ以外の場合はfalse
戻り値
variable スクリプトを評価した結果の値。

対応
AliceScript RC1、RC2、GM、2.0、2.1、2.2、2.3、3.0、4
AliceSister GM、2.0、2.1、2.2、2.3、3.0、4
Losetta 0.8、0.9、0.10、0.11

次の例では、script.txtを読み込み評価します。

AliceScript
using Alice.Interpreter;

var result = interpreter_processfile("script.txt");