src/main/java/com/xdavide9/calculatorfx/CalculatorFXController.java
@FXML
    protected void onEqualsPressed(ActionEvent e) {
        id = updateId(e);
        log.info("Pressed: {}", id);

        onLabel = label.getText();
        if (status(onLabel) == -1) return;

        if (operation != 0) {
            if (label.getText().equals("")) return;
            temp = new BigDecimal(label.getText());
            performOperation();
            operation = 0;
            temp = new BigDecimal("0");
            hasTemp = false;
        } else {
            return;
        }

        builder = new StringBuilder();

        onLabel = String.valueOf(count);
        if (hasTooManyDigits(onLabel.length())) {
            log.error("Result had too many digits");
            displayErr();
            return;
        }

        label.setText(onLabel);
        builder.append(onLabel);

        count = new BigDecimal("0");
        hasCount = false;
    }
/**
     * Performs an operation if it was stored in memory
     * and displays the final value of the expression evaluated so far.
     */
Performs an operation if it was stored in memory
and displays the final value of the expression evaluated so far.
Performs an operation if it was stored in memory and displays the final value of the expression evaluated so far .
@FXML
    protected void onEqualsPressed(ActionEvent e) {
        id = updateId(e);
        log.info("Pressed: {}", id);
        onLabel = label.getText();
        if (status(onLabel) == -1) return;
        if (operation != 0) {
            if (label.getText().equals("")) return;
            temp = new BigDecimal(label.getText());
            performOperation();
            operation = 0;
            temp = new BigDecimal("0");
            hasTemp = false;
        } else {
            return;
        }
        builder = new StringBuilder();
        onLabel = String.valueOf(count);
        if (hasTooManyDigits(onLabel.length())) {
            log.error("Result had too many digits");
            displayErr();
            return;
        }
        label.setText(onLabel);
        builder.append(onLabel);
        count = new BigDecimal("0");
        hasCount = false;
    }
@ FXML protected void onEqualsPressed ( ActionEvent e ) { id = updateId ( e ) ; log . info ( "Pressed: {}" , id ) ; onLabel = label . getText ( ) ; if ( status ( onLabel ) == - 1 ) return ; if ( operation != 0 ) { if ( label . getText ( ) . equals ( "" ) ) return ; temp = new BigDecimal ( label . getText ( ) ) ; performOperation ( ) ; operation = 0 ; temp = new BigDecimal ( "0" ) ; hasTemp = false ; } else { return ; } builder = new StringBuilder ( ) ; onLabel = String . valueOf ( count ) ; if ( hasTooManyDigits ( onLabel . length ( ) ) ) { log . error ( "Result had too many digits" ) ; displayErr ( ) ; return ; } label . setText ( onLabel ) ; builder . append ( onLabel ) ; count = new BigDecimal ( "0" ) ; hasCount = false ; }
Performs an operation if it was stored in memory
 and displays the final value of the expression evaluated so far.
Performs an operation if it was stored in memory and displays the final value of the expression evaluated so far .