如何使用MIT-Scheme执行.scm脚本(在REPL之外)? [英] How do I execute a .scm script (outside of the REPL) with MIT-Scheme?

查看:60
本文介绍了如何使用MIT-Scheme执行.scm脚本(在REPL之外)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想输入类似"scheme file.scm"的内容,并让它解释该文件,然后将我带回到我的shell中,而不是将其加载到REPL中.

I want to type something like 'scheme file.scm' and have it interpret the file, and then take me back to my shell, rather than loading it in the REPL.

我尝试了方案< test.scm并仍使用REPL,唯一的区别是方案在流结束时退出.

edit: I tried scheme < test.scm and it still uses the REPL, the only difference is that scheme exits when the stream ends.

推荐答案

scheme < file.scm应该可以工作(只要您不指定--interactive并且stdin不是终端,则该方案将非交互地起作用).

scheme < file.scm should work (as long as you don't specify --interactive and stdin is not a terminal, scheme works non-interactively).

这篇关于如何使用MIT-Scheme执行.scm脚本(在REPL之外)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆