SCalculator 3

derez

Expert
Licensed User
Longtime User
I have upgraded the SCalculator:
a. Addition of 15 levels of brackets and brackets window.
b. Addition of factorial function N!
c. Addition of DMS display function.
d. Addition of MOD (modulu) function
e. Addition of input scrolling.
f. Buttons re-order and new labels
g. Code improvement (by moving common tasks to common subs).
h. Correction of bugs.

You are invited to look at it and use it if you want to.
The attached file contains the code and a setup program, including operating manual.
It can run on the desktop but the inscriptions on the buttons do not fit.
I shall appreciate comments and suggestions for improvements or additions (there are two spare buttons..)
 

Attachments

  • Calculator.zip
    420.7 KB · Views: 641
  • Scalculator3.JPG
    Scalculator3.JPG
    27.4 KB · Views: 519

bdiscount

Active Member
Licensed User
Its well done in fact I have been using v2 as the calc in a shell for myself. I did add a exit button on v2 before compile to exe
Why 2 blank buttons?
 

derez

Expert
Licensed User
Longtime User
Growth potential
If you have a good idea how to use them - tell me
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
Very nice, I thought you'd be able to compact some of the code by combining it to common subs.
This and the new features must have taken a significant amount of time :sign0188:

Regards,
RandomCoder
 

derez

Expert
Licensed User
Longtime User
Mainly by the use of "sender" for groups of keys with similar functionality
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hello Derez,
Impressed by your brainwork!
Idea: what about adding bitwise.dll to perform Dec to Hex / Hex to Dec, etc. This will well occupy those two vacant buttons :)

One more:

Atnq (unlike Atn gets the correct quadrant)

B4X:
Sub Atnq(x, y)
  z=Atan(x/y)
  if y < 0 Then z = z + cPI
  if y > 0 and x < 0 then z = z + cPI*2
  Return z
End Sub

Cheers
Robert
 

derez

Expert
Licensed User
Longtime User
hex dex

Thank you Alfcen
I have considered the use of HEX and DEC but voted against , I don't feel that anybody really needs it (although you find it in most scientific calculators).
And thanks for the ATNQ tip - it will be used !
David
 

alfcen

Well-Known Member
Licensed User
Longtime User
No problem, David, I just find HEX-DEC-HEX or BIN-DEC-BIN conversions helpful during programming since basic4ppc has no immediate window like embVB.
Anyway, looking forward to the next version :)
 

petrbury

Member
Licensed User
Longtime User
Hi,
for me is HEX,BIN,DEC conversion very useful as well (and for everybody who makes programs for microcontrolers, I think). But I agree that most of users doesn't need it. Anyway your calculator is very nice, I like it.:sign0098:
Petr
 

bdiscount

Active Member
Licensed User
hex dec etc

I use another program for hex etc but it would be nice in the scalc, Also ascii would be good then I could remove 2 programs. just my 2 cents
 

Put Claude

Active Member
Licensed User
Longtime User
some usefull dec-hex-asc-shift-etc

hi,

For programmers off microcontrollers etc... I always use this, do not now where I fetch it years ago, but always use this... very helpfull!!!

Put Claude Belgium
 

alfcen

Well-Known Member
Licensed User
Longtime User
Sorry, if I missed it, David, have you implemented hyperbolic functions, such as...

B4X:
Sub SinH(x)
  Return (cE^x - cE^(-x))/2
End Sub
 

derez

Expert
Licensed User
Longtime User
No, since I do not remember a time that I had to use it.
I remember that the shape of the electrical cables between the poles on the streets are COSH but I never needed to do anything with that.
Still - there is Ln and e^x so the calculation, using memory, is straightforward.
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
... I remember that the shape of the electrical cables between the poles on the streets are COSH but I never needed to do anything with that.

Now your showing your true colours, do I detect that you are an engineer by trade??

Regards,
RandomCoder
 

derez

Expert
Licensed User
Longtime User
MSC in electrical engineering (computers, communication, RF, system)
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
MSC in electrical engineering (computers, communication, RF, system)

Thought as much!
I've a CEng Hons in Electrical and Electronic Engineering, did'nt feel that I wanted to go any higher... plus my employer probably wouldn't have allowed it.
I did the control systems and mobile communications route :)

Regards,
RandomCoder
 

Uli

Member
Licensed User
Longtime User
HEX to BIN

hi,

For programmers off microcontrollers etc... I always use this, do not now where I fetch it years ago, but always use this... very helpfull!!!

Put Claude Belgium

I have to convert HEX to BIN on my job too and miss it too
on SCalculator.
But I can't run your PMABinary on my Laptop and on my PPC
(HYTC Tytn II). For what device is it designed?
Uli
 

Put Claude

Active Member
Licensed User
Longtime User
Hi microcontrollers,

Always have this when going bits and bytes...

Put Claude Belgium
 
Top