我想用C#选项将rebol输出重定向到-q,但最终还是得到了以下结果:
REBOL/View 2.7.7.3.1 1-2010版权2000-2010 REBOL Technologies.版权所有。REBOL是REBOL技术公司的商标。WWW.REBOL.COM
键入桌面以启动Viewtop。
用于上下文使用的C#源代码:
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.WorkingDirectory = @"C:\rebol";
p.StartInfo.FileName = @"C:\rebol\rebol.exe";
p.StartInfo.Arguments = "-qw --do \"firstname: {world} print build-markup {hello <%firstname%>} \"";
p.StartInfo.CreateNoWindow = false;
p.Start();
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
MessageBox.Show(output);如果我直接从Windows运行rebol,我有相同的bug:
C:\rebol\rebol.exe -q --做“名字:{world}打印生成标记{hello <%firstname%>}”
将在rebol控制台中输出:
hello world
REBOL/View 2.7.7.3.1 1-Jan-2010
Copyright 2000-2010 REBOL Technologies. All rights reserved.
REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM
Type desktop to start the Viewtop.
>>发布于 2010-12-24 09:19:40
如果使用--do运行脚本代码,则需要将quit (或q)添加到脚本的末尾,以使REBOL/View退出。此外,要防止Viewtop启动,请添加-v选项。因此,以下几点应该起到了作用:
rebol.exe -qvw --do "print {hello} quit"原因是--do和其他解释器选项之间存在着奇怪的相互作用。我认为这很可能被认为是一个bug,但无论如何,这种情况已经有相当一段时间了。
https://stackoverflow.com/questions/4523048
复制相似问题