Revision 9f0d45d6 filter/filter.c

View differences:

filter/filter.c
230 230
    default: runtime( "Usage of unknown type" );
231 231
    }
232 232
    break;
233
  case '-':
234
    TWOARGS_C;
235
    switch (res.type = v1.type) {
236
    case T_VOID: runtime( "Can not operate with values of type void" );
237
    case T_INT: res.val.i = v1.val.i - v2.val.i; break;
238
    default: runtime( "Usage of unknown type" );
239
    }
240
    break;
241
  case '*':
242
    TWOARGS_C;
243
    switch (res.type = v1.type) {
244
    case T_VOID: runtime( "Can not operate with values of type void" );
245
    case T_INT: res.val.i = v1.val.i * v2.val.i; break;
246
    default: runtime( "Usage of unknown type" );
247
    }
248
    break;
233 249
  case '/':
234 250
    TWOARGS_C;
235 251
    switch (res.type = v1.type) {
......
582 598
  switch(f1->code) {
583 599
  case ',': /* fall through */
584 600
  case '+':
601
  case '-':
602
  case '*':
585 603
  case '/':
586 604
  case P('!','='):
587 605
  case P('=','='):

Also available in: Unified diff