How to use shortcuts

pearCalc allows you to define your own shortcuts. Shortcuts can be seen as constants when calculating or as abbreviations when using pearCalc as application launcher or text replacement tool. To add new shortcuts or edit them just open the preferences window and click on the shortcut tab. To edit a specific shortcut, just double click on it and edit the values as you like. You can rearrange shortcuts simply via drag&drop.

You can also add shortcuts via drag&drop onto the shortcut-list. Just type in your shortcut and replacement-value in a text editor and drag&drop it onto the list. All you have to do is to delimit the shortcut value by a tab from its replacement value. This way you can also achieve multiline replacement values which comes in handy if you use pearCalc as text replacement tool.

Example: pearCalc as currency converter
To see how shortcuts can enhance pearCalc just take a look at the following example. We will turn pearCalc into a currency-converter by defining a shortcut:

That's it! Now you have a simple currency converter that converts from Euros to Dollars and vice versa. You don't believe it? Well just try the following:

"110€=" will give you "100" as result (meaning for 110 Euros you'll get 100 Dollars).
"100$=" will give you "110" as result (meaning for 100 Dollars you'll get 110 Euros).

Example: Teaching pearCalc to use degrees for trigonometric functions
With the use of shortcuts you can also teach pearCalc to use degrees for trigonometric functions instead of radiants. Just define a shortcut with a shortcut-value or "°" and a replacement value of "pi/180" (without the quotes of course). Now you can also pass degree values to trigonometric functions.

sin(30°) = 0.5

Well, of course this works only in one direction, but you get the idea...

BTW: Shortcuts are getting replaced internally in the order they appear in the list. Therefore to change the order of replacement simply rearrange the shortcut-items via drag&drop.

pearCalc-Help

©2002-2007 pearworks (Walter Ritter)