Appendix B

Appendix B - Teach Yourself Scheme in Fixnum Days[Go to...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Teach Yourself Scheme in Fixnum Days [Go to first , previous , next page; contents ; index ] Appendix B DOS batch files in Scheme DOS shell scripts are known as batch files . A conventional DOS batch file that outputs ``Hello, World!'' has the following contents: echo Hello, World! It uses the DOS command echo . The batch file is named hello.bat , which identifies it to the operating system as an executable. It may then be placed in one of the directories on the PATH environment variable. Thereafter, anytime one types hello.bat or simply hello at the DOS prompt, one promptly gets the insufferable greeting. A Scheme version of the hello batch file will perform the same output using Scheme, but we need something in the file to inform DOS that it needs to construe the commands in the file as Scheme, and not as its default batch language. The Scheme batch file, also called hello.bat , looks like: ;@echo off ;goto :start #| :start echo. > c:\_temp.scm echo (load (find-executable-path "hello.bat" >> c:\_temp.scm
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Appendix B - Teach Yourself Scheme in Fixnum Days[Go to...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online