Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculator
#33
Partial fix.

This will not fix the problem of .301 not registering the zero after the 3, or an entry of -.0, but it does fix the problem of the calculator not registering a .0 entry:

Replace your NUMBER: sub routine with...

Code: (Select All)
number:
IF VAL(num$) > 9999999999999999 OR LEN(num$) > 19 THEN
    num$ = LEFT$(num$, 19)
END IF

num = VAL(num$)

'For Math
number2:
COLOR _RGB32(0, 0, 0), _RGB32(0, 0, 0)
_PRINTSTRING (55, 30), ""
'---------------------------------------------------------------------
IF num$ = ".0" THEN ' Leading decimal followed by a zero.
ELSE
    num$ = STR$(num)
END IF
'---------------------------------------------------------------------
IF VAL(num$) > 9999999999999999 OR LEN(num$) > 19 THEN
    num$ = LEFT$(num$, 19)
END IF
COLOR _RGB32(255, 255, 255), _RGB32(0, 0, 0)
_PRINTSTRING (55, 30), num$

RETURN

Pete
Reply


Messages In This Thread
Calculator - by SierraKen - 07-24-2022, 10:21 PM
RE: Calculator - by SierraKen - 07-24-2022, 10:40 PM
RE: Calculator - by Coolman - 07-25-2022, 09:34 AM
RE: Calculator - by James D Jarvis - 07-25-2022, 01:05 PM
RE: Calculator - by Coolman - 07-25-2022, 01:43 PM
RE: Calculator - by OldMoses - 07-25-2022, 11:54 AM
RE: Calculator - by bplus - 07-25-2022, 01:28 PM
RE: Calculator - by SierraKen - 07-25-2022, 07:08 PM
RE: Calculator - by Kernelpanic - 07-25-2022, 09:49 PM
RE: Calculator - by SierraKen - 07-25-2022, 09:53 PM
RE: Calculator - by Kernelpanic - 07-25-2022, 10:24 PM
RE: Calculator - by bplus - 07-25-2022, 09:53 PM
RE: Calculator - by OldMoses - 07-28-2022, 12:41 AM
RE: Calculator - by Kernelpanic - 07-25-2022, 10:45 PM
RE: Calculator - by mnrvovrfc - 07-25-2022, 10:50 PM
RE: Calculator - by bplus - 07-25-2022, 11:10 PM
RE: Calculator - by SierraKen - 07-26-2022, 12:22 AM
RE: Calculator - by SierraKen - 07-26-2022, 04:09 PM
RE: Calculator - by bplus - 07-26-2022, 07:15 PM
RE: Calculator - by SierraKen - 07-26-2022, 09:05 PM
RE: Calculator - by SierraKen - 07-26-2022, 09:19 PM
RE: Calculator - by SierraKen - 07-27-2022, 03:11 AM
RE: Calculator - by Pete - 07-27-2022, 04:38 AM
RE: Calculator - by ChiaPet - 07-27-2022, 06:08 AM
RE: Calculator - by bplus - 07-27-2022, 11:51 AM
RE: Calculator - by ChiaPet - 07-28-2022, 03:54 PM
RE: Calculator - by SierraKen - 07-27-2022, 03:31 PM
RE: Calculator - by Kernelpanic - 07-27-2022, 05:34 PM
RE: Calculator - by Pete - 07-27-2022, 06:32 PM
RE: Calculator - by SierraKen - 07-27-2022, 08:02 PM
RE: Calculator - by Kernelpanic - 07-27-2022, 08:12 PM
RE: Calculator - by SierraKen - 07-27-2022, 08:12 PM
RE: Calculator - by Kernelpanic - 07-27-2022, 08:46 PM
RE: Calculator - by SierraKen - 07-27-2022, 09:27 PM
RE: Calculator - by Pete - 07-27-2022, 09:54 PM
RE: Calculator - by Jack - 07-27-2022, 10:26 PM
RE: Calculator - by Pete - 07-27-2022, 10:42 PM
RE: Calculator - by Pete - 07-27-2022, 11:21 PM
RE: Calculator - by SierraKen - 07-27-2022, 11:59 PM
RE: Calculator - by SierraKen - 07-28-2022, 10:11 PM
RE: Calculator - by Pete - 07-29-2022, 01:00 AM
RE: Calculator - by SierraKen - 07-29-2022, 08:30 PM
RE: Calculator - by Kernelpanic - 07-29-2022, 08:42 PM
RE: Calculator - by SierraKen - 07-29-2022, 08:45 PM
RE: Calculator - by SierraKen - 07-29-2022, 08:47 PM



Users browsing this thread: 12 Guest(s)