I have searched and I really can't seem to find this really basic question. I am new to mit-scheme and essentially I want to recreate hello world but instead of doing it through the prompt, I want to have a scheme file that contains the following code:
(define hello-world
(lambda ()
(begin
(write 'Hello-World)
(newline)
(hello-world))))
The problem is I am missing the simplest questions: What is the file extension for a scheme file? How do I run that file through scheme?
I have tried .ss and .scm but every time I try scheme hello-world.scm it says:
;Warning: Invalid keyword: "hello-world.scm"
;Warning: Unhandled command line options: ("hello-world.scm")
Your issue isn't the file extension, it's just that MIT Scheme prints an error if invoked as scheme hello-world.scm
, since it's supposed to be invoked as
scheme --load hello-world.scm
Also, note that you are using a left-quote character ‘
rather than the actual quote character '
. If you look closely you can see the difference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With