floatKey property Null safety

NormalArgOperation floatKey
final

Implementation

static final NormalArgOperation floatKey = NormalArgOperationWithBeforeCalc(
    stackLift: StackLift.neutral, // But see also FloatKeyArg.onArgComplete()
    beforeCalculate: (state) {
      if (!state.model.isFloatMode) {
        return StackLift.enable;
        // See page 100:  Stack lift is enabled when we go from int mode to
        // float mode, but not when we stay in float mode.  So: CLX,
        // FLOAT 2, 7 will not lift stack.
      } else {
        return StackLift.neutral;
      }
    },
    arg: ArgAlternates(children: [
      DigitArg(max: 9, calc: (m, i) => _setFloat(m, i)),
      KeyArg(key: Operations.dot, child: ArgDone((m) => _setFloat(m, 10))),
    ]),
    name: 'FLOAT');