Newbie questions about Pliant

Newbie questions about Pliant

The switch / case control

Is there a switch / case control in Pliant?
If it exists what is its syntax; if not, then why?
Message posted by andreas on 2001/01/22 16:41:03

Everything is in the abstract...


Message posted by pom on 2001/01/22 17:02:53
There is no switch/case at the present moment. There are two ways of consideing a switch/case construction:
  • either (this is the original switch/case) the switch is done on a character and the switch case is a kind of optimization corresponding to a computed jump,
  • either this is a compact way of writing if/eif/else
In the later case the switch/case won't be difficult to write and is somehow a variation of the 'shunt' construction.