scheme - 以下将在方案中显示什么?
问题描述
我在几个(在线)方案解释器/解析器上尝试过这个表达式,有时会得到不同的答案。对于以下表达式:
(display "okkk") \; "ok;" ;"ok"
它会显示和/或返回什么?为什么?例如:
\
在 s 表达式之外是可以接受的,它们是否会转义下一个字符?- 如何在表达式之外解释字符串,还是无效?
解决方案
这可能取决于您的实现可能支持的 Scheme 语法。
例如,人们可能期望:
(display "okkk") -> displays okkk
\; -> error: unbound variable
"ok;" -> displays nothing, but returns the string
;"ok" -> end of line comment
推荐阅读
- scala - 无法使用 scala 打印结构数据
- java - 按钮和 TabPane 未拾取应用于其父级的 OnMouseMove 事件
- jquery - 更快地在 ignite iggrid 中加载批量数据
- github - 将我在 github 中的项目分为几类
- javascript - 卡上的中心图像
- progressive-web-apps - PWA - 渐进式 Web 应用程序架构
- android - 在 API 响应中获取 JSONElement
- eyeshot - 如何在视野范围内获得 BlockReference 的 boxmin
- javascript - 我不能使用滑动切换
- php - php输出构造函数数组