本文主要是介绍如何在 MIT Scheme 中运行 Scheme 语言程序,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
如何在 MIT Scheme 中运行 Scheme 语言程序?
步骤如下:
1、打开一个文本编辑器(如 Vim, Notepad++ 等),创建一个空白文件,保存为 test.scm ,记住文件后缀名要是 .scm 格式。
2、在终端里进入到 test.scm 所在的目录,然后键入 mit-scheme 命令,启动 mit-scheme 解释器。
3、在 mit-scheme 解释器里输入命令 (cf "test") ,如无错误,会有如下提示信息:
1 ]=> (cf "test");Generating SCode for file: "test.scm" => "test.bin"... done
;Compiling file: "test.bin" => "test.c"...
; clang -DHAVE_CONFIG_H -DMIT_SCHEME -I/usr/local/include -Wold-style-definition -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes -Wnested-externs -Wredundant-decls -Wall -Wundef -Wpointer-arith -Winline -O3 -isysroot /Applications/Xcode.app/Contents/Deve
这篇关于如何在 MIT Scheme 中运行 Scheme 语言程序的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!