-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Интерпретатор можно вызвать из командной строки так:
interpr [options] program.pr [< input.txt] [> output.txt]
Не работает для Windows. Можно исправить добавив флаги -i -o для перенаправления stdin/stdout в файлы
else if (args[pos] == "-i")
{
pos += 1;
try
{
auto input = File(args[pos], "r");
stdin = input;
}
catch (Exception e)
{
stderr.writefln("Cannot find input file \"%s\", using stdin", args[pos]);
}
}
else if (args[pos] == "-o")
{
pos += 1;
try
{
auto output = File(args[pos], "w");
stdout = output;
}
catch (Exception e)
{
stderr.writefln("Cannot find output file \"%s\", using stdout", args[pos]);
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels