Else clauses in switch statements don't work
Posted: Sat Feb 22, 2014 1:25 am
I can't get else clauses in switch statements to work (cfdg 3.0.6(v22), 64-bit Linux):
This gives me an error. Is my code wrong? Is the CFDG documentation wrong? Is there a bug in the cfdg program itself?
Thanks,
— Scott
Code: Select all
startshape badness
shape badness {
switch (randint(3)) {
case 1:
SQUARE [ ]
case 2:
CIRCLE [ ]
else:
TRIANGLE [ ]
}
}
Code: Select all
Error in bad.cfdg at line 9 - syntax error
Thanks,
— Scott