visual-studio-code - 如何在VS Code中运行scheme程序

标签 visual-studio-code scheme

刚刚开始学习SICP(计算机程序的结构和解释)。我安装了 mit-scheme 编译器。我只需在终端中输入 schema 即可运行解释器。我还安装了 VSCode 以及对方案的 linting 支持。

现在我需要从 VSCode 编写、编译并启动方案程序。我该怎么做。我不需要逐行调试。我是 VS 代码新手。

PS:我可以编写程序,编辑它并检查 lint 错误。我无法开箱即用地启动方案编译器。我缺少一些编辑 json 来完成此操作的步骤。

PS PS:我更喜欢 VSCode,我希望 mit-scheme 来解释/编译我的程序。不想使用 Racket 或代码运行器扩展。谢谢!

最佳答案

  1. 主菜单->终端->配置任务
  2. 创建新任务:
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "run scheme",
            "type": "shell",
            "command": "scheme",
            "args": ["<", "${file}"]

        }
    ]
}
  • 使用方案代码打开文件
  • 主菜单->终端->运行任务->运行方案
  • 关于visual-studio-code - 如何在VS Code中运行scheme程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62501529/

    相关文章:

    scheme - (define (add x y) (+ x y)) 和 (define add (lambda (x y) (+ x y))) 有什么区别?

    ruby - 在 ruby​​ 中实现 iota

    visual-studio-code - 如何摆脱 VSCode 'Dirty Editor'

    python - dbt 高级用户 'NoneType' 没有属性 'find_generate_macro_by_name'

    scheme - SICP中的图片语言如何使用帧?

    functional-programming - 循环是如何用函数式语言实现的

    c# - OSX 上的 Visual Studio Code 如何导入 sln/csproj 并运行?

    node.js - Visual Studio Code node.js 调试 : "Connection failed" error

    android-studio - Flutter/Dart 自动完成功能适用于 VS Code,但不适用于 Android Studio

    lambda - 使用 lambdas 帮助理解 cons 和 car 在方案中的这种实现