RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
Forums → Bugs →

SciCalc summary bugs

Subscribe to SciCalc summary bugs 1 post, 1 voice

 
Mar 14, 2019 11:56pm
Avatar Fred Graute (114) 538 posts

There seem to be some problems with the decimal point (DP) and the summary icon in SciCalc 0.87 (23-Apr-2016). If you click on the DP icon multiple times the entry field only adds a single DP, the summary however adds as many as you enter.

Other issues are shown by the following examples:

Entering .25+.36 comes out as: .25 +036
Entering 0.25+0.36 comes out as: .25 + .36
Entering .25+.33 CE .36 comes out as: .25036

I fixed these problems by changing PROCcalc_point from:

DEF PROCcalc_point
LOCAL zero$
  zero$=""
  IF Base%<>BASE_DEC%THEN ENDPROC
  IF NumberComplete%=TRUE THEN Entry$="0"
  IF SummaryComplete%=TRUE THEN Summary$="0":SummaryEntry$="0"
  IF NumberComplete%=TRUE AND SummaryComplete%=FALSE THEN
    SummaryEntry$="0"
    zero$="0"
  ENDIF
  IF INSTR(Entry$,"E")THEN ENDPROC
  IF INSTR(Entry$,DecimalPoint$)=0 ANDLEN(Entry$)<10 THEN
    Entry$=Entry$+DecimalPoint$
  ENDIF
  Entry=FNlocale_val(Entry$)
  NumberComplete%=FALSE:SummaryComplete%=FALSE:OpStack%=FALSE
  PROCcalc_summarise("",zero$+DecimalPoint$,SB_DIGIT%)
ENDPROC

To:

DEF PROCcalc_point
LOCAL zero$
  IF Base%<>BASE_DEC%THEN ENDPROC
  IF NumberComplete%=TRUE THEN Entry$="0"
  IF SummaryComplete%=TRUE THEN Summary$="0":SummaryEntry$="0"
  IF NumberComplete%=TRUE AND SummaryComplete%=FALSE THEN
    SummaryEntry$="0"
  ENDIF
  IF INSTR(Entry$,"E")THEN ENDPROC
  NumberComplete%=FALSE:SummaryComplete%=FALSE:OpStack%=FALSE
  IF INSTR(Entry$,DecimalPoint$)=0 AND LEN(Entry$)<10 THEN
    Entry$=Entry$+DecimalPoint$
    IF SummaryEntry$="" THEN SummaryEntry$="0"
    IF SummaryEntry$="0" THEN zero$="0" ELSE zero$=""
    PROCcalc_summarise("",zero$+DecimalPoint$,SB_DIGIT%)
  ENDIF
  Entry=FNlocale_val(Entry$)
ENDPROC

Not sure if that’s the best fix but it does work a lot better.

Reply

To post replies, please first log in.

Forums → Bugs →

Search forums

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Description

Bug discussions that aren’t covered by the bugs database.

Voices

  • Fred Graute (114)

Options

  • Forums
  • Login
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Beast theme is based on Beast's default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Beast © 2006 Josh Goebel and Rick Olson
This site runs on Rails

Hosted by Arachsys