PhoneCost  -  telephone call coster

by Alan Wrigley
updated by Mike Fowler


This application was first published in RISC User 5:9. The version presented here has been updated to include 3D icons and outline fonts, and to take account of new charging structures such as BT's weekend rate.

The program is designed to provide a quick and easy way to cost telephone calls. When run, an icon is placed on the icon bar. Clicking Menu over this icon opens a menu with the usual Info and Quit options, plus two further options, National and International. These allow you to time inland and international calls respectively.

Clicking Select over the icon opens the application's window. If National has been selected from the menu, the national window will open, while if International is selected the international window will open. On the left-hand side are a series of radio icons from which you must select the charge band. For inland these are: L (local), a (up to 56.4 km), b1 (over 56.4km, low cost routes), b (over 56.4km, other routes), d (personal communication network telephones), m (mobile telephones) and p1 (information and entertainment services). For international there are 14 bands altogether, comprising IR (Irish republic) plus bands 1-13.

On the right-hand side are two sets of digits: the upper set shows elapsed time while the lower set shows current cost. Between these two sets are a Start icon and a Reset icon.

The rate (i.e. weekend, cheap, daytime/standard or peak - band d only) is calculated automatically by the computer from the real time clock, so you must ensure that the clock is kept correct if you want PhoneCost to give an accurate result. The time is read dynamically, so if a call spans two charge bands the correct charges will apply to each band. The rates are accurate for both inland and international calls at April 1994, including the new National Weekend rate, the abolition of peak rate (except for band d), and lower rates for some international calls. The program assumes that Christmas Day, Boxing Day and New Years Day are cheap rate in all charge bands, as is currently the case. If the rates and times are subsequently altered, the program may not give an accurate result. If this happens, RISC User will endeavour to publish an updated version of the program in due course. 

To use the application, first select the charge band for the call you are about to make. When the call is connected, click on the Start icon, and the elapsed time and current cost displays will first be reset to zero and then start to increment accordingly. The Start icon also changes its text to Stop. The elapsed time is shown in seconds, while the current cost is rounded up to the next highest whole penny. When the call is disconnected, click on Stop, and the total time and total cost of the call will remain on the display. The icon will also revert to the Start legend. To clear the display to zero without starting a fresh timing, click on the Reset icon (which is greyed out while the timer is running).

From time to time the cost of a unit and the time allowed for one unit in the various charge bands is altered by the telephone company. The current figures are read in from a file called Charges which is kept inside the !PhoneCost application directory. This is a text file and so can easily be altered in Edit when the charges are changed. It consists of a series of lines, each containing one figure. The first line is the cost per unit in hundredths of a penny (as supplied on this disc the figure does not include VAT, but you can alter it to the VAT-inclusive figure if you wish). Subsequent lines form an array of figures showing centiseconds per unit in each charge band, each in the order of cheap, standard and peak. Where a figure of zero is shown for a peak-rate period, then that chargeband does not have a peak rate. Comments may be placed at the end of the line after a semi-colon, and the file supplied on this disc is commented to show the meaning of each line in the file.

 RISC User 1992, 1994
