PositionnableStream>>back behavior?
Damien Cassou
damien.cassou at gmail.com
Fri Apr 6 16:50:39 UTC 2007
2007/4/6, tim Rowledge <tim at rowledge.org>:
>
> On 6-Apr-07, at 8:08 AM, Damien Cassou wrote:
>
> > Hi,
> >
> > I don't really understand why #back goes two step backward:
> >
> > stream := ReadStream on: 'abc' copy.
> > stream next.
> > stream next.
> > stream peek. ==> $c
> > stream back. ==> $a
> >
> > If the following character is $c then the previous one should be $b.
> > Don't you think so?
>
> If current char is$b, then next is $c and previous is $a.
Ok :-) I didn't know there were a notion of current element. I thought
a stream was always between two elements; and there is no notion of
current in ANSI Smalltlalk.
Thank you
--
Damien Cassou
More information about the Squeak-dev
mailing list
|