I property Null safety
final
The HP 16's I operation, related to the index register
Implementation
static final NormalOperation I = NormalOperation(
pressed: (ActiveState s) => s.liftStackIfEnabled(),
calc: (Model m) {
final v = m.memory.registers.index;
if (m.isFloatMode) {
v.asDouble; // Throw CalculatorError if not
}
m.x = v;
m.display.displayX();
},
name: 'I');