[Newbies] next or break in a loop
Phil (list)
pbpublist at gmail.com
Mon May 9 19:13:50 UTC 2016
On Mon, 2016-05-09 at 20:51 +0200, Bert Freudenberg wrote:
> On 09.05.2016, at 20:35, Phil (list) <pbpublist at gmail.com> wrote:
> >
> >
> > Smalltalk doesn't have a switch/case statement
> True, but Squeak does:
>
> aValue caseOf: {
> [firstValue] -> [firstBlock].
> [secondValue] -> [secondBlock].
> } otherwise: [elseBlock]
>
> - Bert -
>
Hah... learn something new every day (I don't remember noticing that
method before.) This is definitely an improvement.
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
More information about the Beginners
mailing list