Using constants in Go Calc

One of the many powerful features available in Go Calc is user defined constants. When you are writing a formula you can refer to a variable or result in another calculation. One way you can use this is by defining commonly used constants. In this post I will show you how to define a constant for VAT (Value Added Tax, called Sales Tax in the US).

Here is a Go Calc freshly purchased from the App Store:

Go Calc just installed

I am going to create a category (folder) to store my constants in. Simply tap the Edit button and choose New Category. I will name the category Constants.

Creating a new category 1 Creating a new category 2 Creating a new category 3

Tap on the newly created Constants category and tap the Add (+) button to create a new calculation. This calculation will store the financial constants.

Empty Category New Calculation Finance

Click Save to start editing the calculation. In this example just one constant is going to be added. Tap the Add Variable button and we will add the VAT constant.

Editing the Calculation

The variable name is VAT, a suffix % is added and two decimal places are to be shown.

New Variable VAT

Tap Save. You can now set the current VAT rate – double tap on the VAT variable (or tap the blue indicator)

Showing the VAT variable Setting the VAT value The set variable

I will now create a new calculation which will use this constant.

Creating the example calculation

The calculation has a variable Price Exc VAT

Variable Price Exc VAT

… and then add a result which will work out Price Inc VAT. The formula refers to the constant defined earlier. To refer to a constant you need to describe the path needed to reach it. In this case the constant is in the Finance calculation, which is filed in the Constants category. So we write Constants.Finance.VAT (<category>.<calculation>.<variable>). Using this technique you can refer to any variable in any calculation you have in Go Calc.

New Result 1 The formula

Here is the example calculation in use.

The example calculation

Now if VAT changes you can change the constant and any calculation using it will automatically have the up-to-date value.

Happy Go Calc-ing!

One thought on “Using constants in Go Calc

  1. Hi! Thanks your Nice App!

    I’m Japanese iPhone & iPod touch user.(I reviewed it’s in Jap’ AppStore”).

    It’s very cool & useful!

    By the way, I have 2 request are :

    1.”Up-Down Buttons”,
    if mounted, I’ll be able to check results with realtime and immediately!

    2.”Reset Button”,
    thats will clear all inputted-values!

    So, c u soon!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>