如何在球拍中安装 sicp 包模块? [英] How to install sicp package module in racket?
问题描述
我是编程领域的新手.我正在使用 ubuntu 操作系统.我从sicp书开始了我的旅程.我正在使用 scheme repl
.但突然间我陷入了 2.2 部分.4
I'm newbie in programming world. I'm using ubuntu OS. I have started my journey with sicp book. I'm working with scheme repl
. But suddenly I get stuck with section 2.2.4
我无法使用 scheme repl
执行它的示例.我试图运行给定的部分示例,出现如下错误
I'm not able to execute it's example with scheme repl
. I tried to run given example of section, I got an error as given below
1 ]=> (define wave2 (beside wave (flip-vert wave)))
;Unbound variable: wave
即使在书中,painter 也作为原始程序给出.当我运行它时,它也抛出了一个错误
Even In book, painter is given as primitive procedure. when I ran it, it thrown an error too
1 ]=> painter
;Unbound variable: painter
我不知道,我哪里做错了?我可以使用 scheme repl 运行这些示例吗?
I don't know, where I'm doing mistake? can I run these example with scheme repl?
我已经安装了 racket 来解决这个问题,但是我无法为它安装 sicp 包.我正在关注这些 说明.不幸的是,我没有那么好.如何安装这些包?
I have installed racket to solve this problem, But I'm not able to install sicp package for it. I was following these instruction. Unfortunately I didn't get that well. How can install these package?
请提出您的建议以解决此问题.
Please give your suggestion to solve this problem.
推荐答案
使用DrRacket安装sicp包如下:
Use DrRacket to install the sicp package like this:
打开包管理器:在 DrRacket 中选择菜单文件",然后选择包管理器...".
Open the Package Manager: in DrRacket choose the menu "File" then choose "Package Manager...".
在Do What I Mean"选项卡中找到文本字段并输入:sicp"
In the tab "Do What I Mean" find the text field and enter: "sicp"
最后点击安装"按钮.
测试一下.确保 DrRacket 在左下角有Determine language from source".编写以下程序并点击运行:
Test it. Make sure DrRacket has "Determine language from source" in the bottom left corner. Write the following program and click run:
#lang scp
(inc 42)
预期输出为 43.
这篇关于如何在球拍中安装 sicp 包模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!