There are some differences when HtDP programs are run from the DrRacket IDE versus using the "racket" command line program. I am using DrRacket 7.8 on MacOS 10.13.6.
For example, this Beginning Student code file:
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname file) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(exact? (string->number "1.0"))
will show #true when run in DrRacket IDE. But when run with racket file.rkt in the command line, it prints #false.
As another example, the following Beginning Student program shows an error "read-syntax: illegal use of ```" in DrRacket IDE:
;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname file) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define (quasiquote x) x)
(define (f x) 123)
`(f 888)
But when run with racket file.rkt in command line, prints 123.
There may be other differences, but these are just 2 examples I found.
Could the differences be fixed? My understanding is that the "racket" command line program should behave the same as clicking the "Run" button in DrRacket IDE.
There are some differences when HtDP programs are run from the DrRacket IDE versus using the "racket" command line program. I am using DrRacket 7.8 on MacOS 10.13.6.
For example, this Beginning Student code file:
will show
#true
when run in DrRacket IDE. But when run withracket file.rkt
in the command line, it prints#false
.As another example, the following Beginning Student program shows an error "read-syntax: illegal use of ```" in DrRacket IDE:
But when run with
racket file.rkt
in command line, prints 123.There may be other differences, but these are just 2 examples I found.
Could the differences be fixed? My understanding is that the "racket" command line program should behave the same as clicking the "Run" button in DrRacket IDE.
Background discussion: https://groups.google.com/g/racket-users/c/r7ln_xUhJhY