Once in a warehouse, I was seeing a task that requires attention. Many calculators were been used on many of the workstations for various purposes. Three cash registers were using the same calculator for calculating pickup report amounts. On the warehouse area employees were using calculators for inventory transaction purposes. To many calculators around! This equipments were constantly passing from hands to hands depreciating fast. Many times calculators were used at the workstation side. If I had a better thing than a calculator why I doesn't use it. So I start to write a calculator code that could be portable to any of the file-Pro processing tables.
if:
then: xo="10";yo="10"
----------------------------------
if:
then: call "calc"
----------------------------------
XO and YO are the row and col parameters for the first corner of the calculator window (X1,Y1).If parameters are off screen they are re-arrange. Remember XO and YO must be declared in the automatic processing table of the file-Pro file you are going to use calc.prc.
Once called, you will see the accumulator cleared. The calculator is post-fix oriented. That means that every time you want to add, substract, multiply and divide you should type the operator first. Example if you want to add: 30 + 1 you should do it like this: +30 (ENTER) +1 (ENTER). The calculator will end if you type e or r where the arithmetical operator goes.
When you press r the contents of the calculator are returned in a variable, re. Declare that variable on the automatic processing table for returning puposes.
The processing table is downloaded here. Place it in any file-Pro file ("directory").