Switsch Statement like in java.
Matej Košík
kosik at fiit.stuba.sk
Wed Sep 7 13:41:45 UTC 2005
Ivan Tomek wrote:
> Hi Matej,
>
> I use VW rather than Squeak. Is the code available in a text file or some other universally downloadable form?
>
> Thanks.
Hi Ivan,
I have filed relevant sources out for you, they can be now downloaded here
http://altair.dcs.elf.stuba.sk/~kosik/tmp/COND/
There are three files
Association-*cond.st
AssociationTest-testCond.st
Association class-*cond.st
The file `AssociationTest-testCond.st' contains black-box checking
whether the provided functionality works as expected.
File `Association-*cond.st' contains a single method
doesNotUnderstand: aMessage
It either invokes generation of the not-yet-generated cond:cond:cond:...
method or reraises the exception (in the rest cases).
File `Association class-*cond.st' contains two methods
generateCondMethodFor: numberOfBranches
removeGeneratedCondMethods
The first one generates cond:cond:cond:... method with a given number of
branches. The second one removes all the hitherto generated method. It
is supposed to provide convenient ways how to clean things.
I think that I should also enrich the documentation with
anti-examples---i.e. incorrect usages.
If you find any natural example where cond:cond:cond:... where it would
be advantageous to use it, I would be grateful if you let me know. Until
know I have none.
Regards
--
Matej Košík
ICQ: 300133844
http://altair.dcs.elf.stuba.sk/wiki/Kosik/Main
More information about the Squeak-dev
mailing list
|