2010/3/3 Edgar J. De Cleene <
[hidden email]>:
> To my previous question
>
> mixedWith: aSoundBuffer
> | start end |
> start := - 32767 . “you can’t use it , Squeak is not FORTRAN , you should
> use 0 – aninteger instead “
Yes, we have no unary prefix operator,
But you can as well use -32767 without any space in between because
this is an officially supported Smalltalk literal.
Nicolas
> end := 32767.
> ^ ((aSoundBuffer size >= self size) ifTrue: [aSoundBuffer] ifFalse:
> [self])
> collectWithIndex: [:s :i |
> (s + (self at: i ifAbsent: [0])) forceIn: (Interval from: start
> to: end)].
>
> Edgar
>
>
>
>
>