Add if and switch
Status: Pre-Alpha
Brought to you by:
zhouhui
It seems that by adding loop and switch, the language
became complete regarding flowcontrol.
Dragon already has the loop builtin, next step is to add a
switch builtin.
I am thinking of these forms:
if condition:
indented block (the true case)
if condition:
indented True:
further indented truecase
indented False:
further indented falsecase
and:
switch condition:
indented case1:
further indented block
indented case2:
further indented block
...
Logged In: YES
user_id=977760
In the cases that need specify true/false or the cases, it
seems that we needs a scoped builtin capability.
The if scope will have the True or False builtin and the switch
scope will have the case builtin. Is there a way to specify the
case builtin but drop the CASE keyword?