gosub method Null safety

void gosub(
  1. int label
)

Implementation

void gosub(int label) {
  if (_returnStackPos >= _returnStack.length) {
    throw CalculatorError(5);
  }
  final returnTo = currentLine;
  goto(label);
  if (returnStackUnderflow) {
    // Keyboard entry of GSB, integrate or solve to start program
    _returnStackPos++;
  } else {
    _returnStack[_returnStackPos++] = returnTo;
  }
}