vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.15k stars 136 forks source link

Conditional break not allowed #295

Open tueda opened 5 years ago

tueda commented 5 years ago

Conditional break from a switch construction, which would be expected to work in almost any computer language that has a switch construction, doesn't work:

S x;
L F = 1;
$x = 1;
switch $x;
  case 1;
    if (count(x,1));
      break;
    endif;
endswitch;
.end
FORM 4.2.0 (Oct 10 2018, v4.2.0-78-g07cce53) 64-bits  Run: Fri Oct 19 22:42:22 2018
    S x;
    L F = 1;
    $x = 1;
    switch $x;
      case 1;
        if (count(x,1));
          break;
test.frm Line 7 --> Illegal nesting of switch/case/default with if/while/repeat
/loop/argument/term/...
        endif;
    endswitch;
    .end
Program terminating at test.frm Line 9 -->