feach function

void feach(
  1. dynamic w
)

Implementation

void feach(w) {
  num? x = UNIT[w];
  if (x != null) {
    g = g + x;
  } else if (w == 'hundred') {
    g = g * 100;
  } else {
    x = double.parse(MAGNITUDE[w].toString());
    if (x != null) {
      n = n + g * x;
      g = 0;
    } else {
      print('unknown number');
    }
  }
}