Re: [racket] Newline problem

2012-05-05 Thread jkaczorek
Savinga newline into a file doesn’t work (windows7 racket 5.2.1). I havetried it on several ways: I have used (displayln port), (newline port) , fprintf with ~n and ~% -all without an accurate result. It is interesting that the same code works right In another environment(racket 5.1.1 on l

[racket] Newline problem

2012-05-05 Thread jkaczorek
Hello all, I have a following problem: Saving a newline into a file doesn’t work (windows7 racket 5.2.1). I have tried it on several ways: I have used (displayln port), (newline port) , fprintf with ~n and ~% - all without an accurate result. It is interesting that the same code works right In a

Re: [racket] classes and objects

2012-03-18 Thread jkaczorek
On Sun, 2012-03-18 at 14:38 -0400, jkaczo...@aol.pl wrote: > Could anyone explain me how to create objects and their instances? > [...] Hello, first you have to create a class. An empty class definition might look like this: (define foo% (class object% (super-new))) Note that a

[racket] classes and objects

2012-03-18 Thread jkaczorek
Could anyone explain me how to create objectsand their instances? I've read of course the racket guide and reference but the examples I foundthere are (for me) completely useless: I'm not interested in how to create class hierarchies. The only thing I want toknow is how to create a class and how

Re: [racket] set! racket behaviour

2011-11-02 Thread jkaczorek
-Original Message- From: Dan Grossman To: David Vanderson CC: jkaczorek ; users Sent: Mon, 31 Oct 2011 21:25 Subject: Re: [racket] set! racket behaviour I also found it counterintuitive that #lang racket (define x 0) (set! x 1) works, but moving the set! out of the module and

Re: [racket] set! racket behaviour

2011-11-02 Thread jkaczorek
-Original Message- From: Dan Grossman To: David Vanderson CC: jkaczorek ; users Sent: Mon, 31 Oct 2011 21:25 Subject: Re: [racket] set! racket behaviour I also found it counterintuitive that #lang racket (define x 0) (set! x 1) works, but moving the set! out of the module

[racket] set! racket behaviour

2011-10-31 Thread jkaczorek
Hi, I’m using DrRacket. In an edit window I have written: #lang racket (define counter 0) I’m pressing “Run” button and next, in a command line, after running a command: (set! counter (add1 counter)) I receive a message “set!: cannot modify a constant: counter” The problem can be resolved by