[racket] display problem
On Fri, Apr 6, 2012 at 1:38 PM, Danny Yoo <dyoo at cs.wpi.edu> wrote:
>>
>> Oke,
>> Back to the beginning.
>>
>> In the text is noted.
>> (define-struct editor (pre post))
>> ; Editor = (make-editor String String)
>> ; interp. (make-editor s t) means the text in the editor is
>> ; (string-append s t) with the cursor displayed between s and t
>>
>>
>> So for aaaaa| s has the value of aaaaa en t has the value of ""
>> For aaaaa|aaa s I think s has the value of aaaaa and t has the value of aaa
>
>
> Yes, much better. Be a bit more specific. Rather than say that
> something has the value aaaaa, it's a bit better to be consistent
> about what things are strings by putting quotes "aaaaa".
But to be clear, by examples of data, use code rather than prose: it will help.
When you say:
So for aaaaa| s has the value of aaaaa and t has the value of ""
this is still a bit too informal in the place where you should be formal.
Rather:
So for aaaaa|, (make-editor "aaaaa" "")
and for aaaaa|aaa, (make-editor "aaaaa" "aaa")
It's ok to use informal prose, which might use your own notation. But
follow it up with the notation used in the programming language.