SCalculator 2

derez

Expert
Licensed User
Longtime User
The competition made me look again at my SCalculator and I found a very important capability missing - the capability to use brackets when you want to do a calculation with other order than the mathematical.
The addition of this capability was surprisingly simple -
I changed the three registers and the three operation level storage to arrays, and now they work in the same way but for various levels for each pair of brackets.
I added another function - the Factorial N!.

I shall apreciate comments and suggestions for improvements. For example :
almost all the subs start with a set of checks that if they fail the sub ends by "return".
If I take this returning part to another common sub, i cannot use "return" because it will return and perform the originating sub instead of getting out.
i am sure someone knows how to do it :sign0163:
 

Attachments

  • SCalculator_2.zip
    57 KB · Views: 247

derez

Expert
Licensed User
Longtime User
Common sub

I found a way to do it:
the calling sub use " If F_common = false Then Return"
and in the common sub, all the checks return false if they are met.
Nice talking to myself...
 

Cableguy

Expert
Licensed User
Longtime User
I have found that the simples way of resolving emerging issues,...they always seems to laugth at us as sying " You'll never find the simples ansewer that is right under your nose!!"

Them if that fails I come to the forum and ask the "stuppidiest" (notice the quotes!!) and find that the ansewr had already pass by me but I was too busy making the question...

Anyway glad to have here..as I recall you are one of the Original "samlers" of basic4ppc, right...?
 

derez

Expert
Licensed User
Longtime User
I think that the need to phrase your problem and write it down has some effect on the growing of the solution inside you...

and yes - I have started with version 4 and since then it became a large consumer of my free time...
 
Top