[plt-scheme] make-posn / set-posn-x / graphics.ss
Hi!
It seems that make-posn is overloaded by graphics.ss while set-posn-x/y is not.
The simple test program below gives an error if graphics.ss is included but
works just fine if it isn't. And the error message is a bit confusing too:
set-posn-x!: expects args of type <struct:posn>; given instance of a different
<struct:posn>
I think it's a bad idea to introduce such an inconsistency unless it's because
of a technical problem.
Comments?
Btw, thanks for an awesome Scheme system!
Regards, Tommy
;(require (lib "graphics.ss" "graphics"))
(define pos (make-posn 0 0))
; set-posn-x & set-posn-y aren't defined in graphics.ss :-(
(set-posn-x! pos 1)
(set-posn-y! pos 2)
(display (posn-x pos)) (newline)
(display (posn-y pos)) (newline)
_____________________________________________________
Gratis e-mail resten av livet på www.yahoo.se/mail
Busenkelt!