Home » Archimedes archive » Archimedes World » AW-1994-04-Disc2.adf » Disk2Apr94 » !AWApr94/Goodies/PowerBase/PBaseDoc/Calculate
!AWApr94/Goodies/PowerBase/PBaseDoc/Calculate
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1994-04-Disc2.adf » Disk2Apr94 |
Filename: | !AWApr94/Goodies/PowerBase/PBaseDoc/Calculate |
Read OK: | ✔ |
File size: | 3818 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Performing Calculations ======================= There are two mechanisms for performing calculations in Powerbase:- (1) Fields which automatically calculate and display a value derived from other fields. (2) Calculations performed on a column in a report. Self-calculating fields ======================= Fields defined to be of 'Calculated' type display a numeric result derived from other fields in the record. When the mouse pointer is moved over such a field it changes into a shape resembling a pocket calculator. Fields of 'Composite' type perform a similar function but display a textual "value" instead of a number. In this case the mouse pointer changes into a large "plus" sign. It isn't possible to type data directly into either of these special types of field. The latter do not, strictly, involve "calculations" at all but because 'Composite' and 'Calculated' fields work in the same way it is convenient to deal with them together. It is possible to write your own functions in Basic and make use of them in 'Calculated' and 'Composite' fields. The system variable TIME$ is also useful in this connection. 'Calculated' fields ------------------- Click MENU over the field to bring up the 'Field' submenu and move right over the fourth choice ('Calculations'). You must have 'Manager' access rights in order to do this, otherwise the menu option is shaded. A dialogue box appears into which you can type the formula to be used to calculate the value of the field. Suppose we have four normal numeric fields whose tags are No1, No2, No3 and No4 and a Calculated field called AVGE. The dialogue box will initially show: AVGE= Complete the formula so that it reads: AVGE=(No1+No2+No3+No4)/4 and click on 'OK' or type RETURN. From now on, whenever any of the numbers in No1, No2, No3 and No4 are entered or altered the contents of AVGE will be updated in accordance with the formula. To make formula entry easier, the dialogue box works like the Match window i.e. clicking on a field in the main window whilst the dialogue box is open causes the tag of the field to be copied into the formula. The default setting is such that entering or altering a formula affects only those records which are added or altered after the formula entry/change. The changes can be made retrospective by setting the option button on the formula entry window. On clicking OK you will then be asked to confirm that you want previous records to be made consistent with the formula you have just entered. Changes affect the current subfile only, but can be easily implemented in other subfiles by changing to the required subfile, calling up the formula entry window, selecting the option button and clicking OK. You might think that this process is only applicable to numeric fields, but you would be wrong! A non-numeric field may be specified in the formula IF it is linked to a validation table. To be of any use there must be numeric data in the column of the validation table immediately following the one to which the field is linked. (See 'Validation' for a description of validation tables and field-linking.) Suppose, for example, we have fields in a student record for A-level exam grades, the field tags being A1, A2, A3, A4. The grades are non-numeric but they map onto the numeric "points system" which universities use to control entry. The relationship of grades to points is as follows:- Grade Points ===== ====== A 10 B 8 C 6 D 4 E 2 A validation table could be set up with the grades in column 0 and the equivalent points in column 1. Each of fields A1-A4 would be linked to column 0. A further field of type 6 (Calculated) would be created to hold the points score. Let's suppose this has the tag PTS. Use the method given above to associate this field with the formula PTS=A1+A2+A3+A4. From now on entering or changing the letter grades in A1-A5 will cause the points score to be updated in PTS. A further feature of Calculated fields is their use with Time fields (by which we mean editable Time fields in the 'Data' class, not the current time of day field provided in the 'Stamp' class (see below). If the tag of such a field is included in a calculation formula it will be converted into seconds. Thus a Calculated field (DIFF) could use two Time fields, TIM1 and TIM2, in the formula DIFF=TIM1-TIM2 and Powerbase would keep DIFF updated to show the difference in seconds between the two times. 'Composite' fields ------------------ Click MENU over the field to bring up the 'Field' submenu and move right over the fifth choice ('Combine fields'). You must have 'Manager' access rights in order to do this, otherwise the menu option is shaded. A dialogue box appears into which you can type the formula to be used to "calculate" the value of the field. Formula entry is similar to that for 'Calculated' fields except that only string operations are allowed. The one most frequently used will be '+' but you may use the BASIC statements LEFT$, RIGHT$ and MID$, as well as literal strings. As an example of use you might have three fields in a database called SNAM, FNAM and MNAM for surname, forename and middle name. Addressing letters requires another field containing just the first two of these, but in the reverse order. You could therefore define a 'Composite' field called NAME and enter the formula: NAME=FNAM+" "+SNAM Note the use of a literal string to place a space between the names. Composite fields, like Calculated fields, may be used in conjunction with Time fields to perform genuine "clock arithmetic". Referring to the example above, using DIFF=TIM1-TIM2, if we attached the formula to a Composite field the latter would show the difference in hours, minutes and seconds. The method can be extended to jobs such as averaging times, e.g. with a formula such as AVE=(TIM1+TIM2+TIM3)/3. As with 'Calculated' fields updating occurs after editing a field whose tag appears in the attached formula. Thus NAME would be updated after changes to FNAM or SNAM and DIFF after changes to TIM1 or TIM2. You can, however, have 'Composite' fields which make use of the Basic system variable TIME$. Thus a fied DAY could be linked to the formula DAY=LEFT$(TIME$,3) to make it show Mon, Tue etc. No field tags are referred to in the formula so when does DAY get updated? The answer for this, or any other 'Composite' field using TIME$, is that updating occurs immediately before displaying the record so that the information is correct at that time. User functions ============== These are functions, written in Basic, which accept field tags as parameters and can be included in the calculation formulae of self-calculating fields. All such functions must return only their principal value - RETURN variables in the parameter list aren't allowed. The name of each function must begin with an upper-case 'U', e.g. FNUaverage. This is to avoid duplication of function names which already appear in Powerbase. All the user functions to be used by a database must be included in a Basic program called UserFuncs which is stored in the database directory (not in the Powerbase directory). When the database is opened UserFuncs will be loaded as a LIBRARY and Powerbase can call the user functions just as readily as on its own functions. The distribution disc includes a UserFuncs file containing two examples of user functions kindly submitted by David Lenthall. Users are invited to submit other user functions for possible inclusion in the function library. FNUnow (which takes no parameters) operates on the value of TIME$ from the real-time clock and returns a string containing the current date in form DD-MM-YY. A record design could include a field of 'Composite' type, at least eight characters long and tagged as, for example, DATE. Associating the field with the formula DATE=FNUnow would cause the field to display the current date at all times. The second function, FNUageinyrs accepts two parameters, each of which should be the tag of a field which holds a date in DD-MM-YY format, and returns the difference between the dates to the nearest year. The first date should be the earlier of the two. If your record design has a field for Date of Birth (let's call its tag DOB) you can use this function together with FNUnow to make a 'Composite' field (AGE) display a person's age in years by using the formula AGE=FNUageinyrs(DOB,FNUnow). Considerable care is needed in constructing user functions since it is very easy to make Powerbase generate errors. In particular you must avoid giving a function a name which is the same as a field tag, or even one which contains a field tag as a substring. The two functions described could not, for instance, be used in a database which had a field tagged as "now" or "age", although "NOW" and "AGE" could be used. 'Calculated' and 'Composite' fields are normally updated when changes are made to the fields whose tags appear in their calculation formulae. If a formula contains a user function then the field will be updated after changes to those fields whose tags appear in the parameter list of the function. The previous discussion of 'Composite' fields referred to the fact that they are updated after altering fields whose tags appear in the calculation formula or, in the case of those using TIME$, immediatly before display. There is a slight problem in that user functions may use TIME$ without it appearing in the parameter list of the function - FNUnow is an example of this. The field AGE in the example given above will only be updated when DOB is edited. In other words it will show the person's age at the time you enter his/her date of birth but won't automatically change it a year later. To make the change automatic you could introduce TIME$ as a parameter in FNUnow, i.e. make it FNUnow(TIME$) even though the function doesn't need it. As soon as Powerbase sees TIME$ in the formula it will update AGE. The same trick of introducing TIME$ as a "dummy" parameter can be used for any user function associated with a field which you want updating immediately. 'Stamp' fields -------------- Although not used to perform calculations or string operations mention will be made here of this special class of field since, like 'Calculated' and 'Composite' fields, they are non-editable and Powerbase maintains their contents automatically and distinguishes them by changing the pointer to a "#" symbol. The contents of such a field may be any of the following:- (1) the record number in the database file (2) a unique number for each record obtained by counting upwards from a user-specified base value (3) the time of day when a record was first entered (4) the date on which a record was first entered. This may be in any of the following forms: (a) Sun,01 Aug 1993 (b) 01-08-93 (c) 01-08-1993 (5) the date and time at which a record was first entered. (6) the day on which a record was first entered. This may be either day of week (e.g. Tue) or of month (e.g. 24). (7) the month in which a record was first entered. This may be either a string (e.g. Oct) or a number (e.g. 10). (8) the year in which a record was first entered (9) the date and time at which a record was last altered (10) a sprite such as a company logo which appears on every record When creating a field of type (2) you will observe that the fill-in field labelled 'Numeric min' becomes active. This is to allow you to enter the base address for the sequence number. Suppose, for example, you want each record to have a number from, say, 4000 upwards which remains attached only to the record to which it was originally assigned. To achieve this enter 4000 in the 'Numeric min' box when creating the field. The first record entered in the new database will then be given sequence number 4000, the next will be assigned 4001. Deleting the second record and inserting a new one gives the new record the number 4002 and leaves the database without a record with sequence number 4001. Thus the contents of such a field always indicate the order in which records were initially entered. Fields which display the record number (1) will also indicate the order of entry until you delete a record and insert a new one. When a record is deleted (i.e. with the "dustbin" button, not merely moved to another subfile) its record number is released and will be reused by the next new record. Displaying a logo on each record -------------------------------- The sprite for the logo should have a name not more than four letters long and should be included in a sprite file called 'UsrSprites'. This file is placed inside the database directory. When designing the screen select the 'Logo' type from the 'Stamp' class of fields and use the name of the required sprite as the tag. When the database is in use the sprite will appear on every record, provided the UsrSprites file is in place. If not then the field will appear as a rectangle which is empty apart from the name of the missing sprite. You may use several logos on the screen at the same time. All the sprites must be present in UsrSprites. All 'Stamp' fields (except 'Logo') may be included in a report. They may also be indexed. Calculations on a column of a report ==================================== There is an option on the 'Print' submenu called 'Numeric fields' which leads to a dialogue box listing all the fields (if any) in the record which are of type 3 ('Number') or 6 ('Calculated'). Associated with each field are four check boxes headed 'Count', 'Sum', ''Average' and 'Standard deviation'. These boxes are shaded until a field is included in a print selection. They then become "live" and any or all of them may be chosen by clicking with SELECT. The information requested is then added to the list footer when printing takes place.
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000010 20 20 20 20 20 20 20 20 50 65 72 66 6f 72 6d 69 | Performi| 00000020 6e 67 20 43 61 6c 63 75 6c 61 74 69 6f 6e 73 0a |ng Calculations.| 00000030 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000040 20 20 20 20 20 20 20 20 3d 3d 3d 3d 3d 3d 3d 3d | ========| 00000050 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a |===============.| 00000060 0a 54 68 65 72 65 20 61 72 65 20 74 77 6f 20 6d |.There are two m| 00000070 65 63 68 61 6e 69 73 6d 73 20 66 6f 72 20 70 65 |echanisms for pe| 00000080 72 66 6f 72 6d 69 6e 67 20 63 61 6c 63 75 6c 61 |rforming calcula| 00000090 74 69 6f 6e 73 20 69 6e 20 50 6f 77 65 72 62 61 |tions in Powerba| 000000a0 73 65 3a 2d 0a 0a 20 20 20 20 20 20 20 20 28 31 |se:-.. (1| 000000b0 29 20 46 69 65 6c 64 73 20 77 68 69 63 68 20 61 |) Fields which a| 000000c0 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 63 61 6c |utomatically cal| 000000d0 63 75 6c 61 74 65 20 61 6e 64 20 64 69 73 70 6c |culate and displ| 000000e0 61 79 20 61 20 76 61 6c 75 65 20 64 65 72 69 76 |ay a value deriv| 000000f0 65 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 |ed. f| 00000100 72 6f 6d 20 6f 74 68 65 72 20 66 69 65 6c 64 73 |rom other fields| 00000110 2e 0a 20 20 20 20 20 20 20 20 28 32 29 20 43 61 |.. (2) Ca| 00000120 6c 63 75 6c 61 74 69 6f 6e 73 20 70 65 72 66 6f |lculations perfo| 00000130 72 6d 65 64 20 6f 6e 20 61 20 63 6f 6c 75 6d 6e |rmed on a column| 00000140 20 69 6e 20 61 20 72 65 70 6f 72 74 2e 0a 0a 53 | in a report...S| 00000150 65 6c 66 2d 63 61 6c 63 75 6c 61 74 69 6e 67 20 |elf-calculating | 00000160 66 69 65 6c 64 73 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d |fields.=========| 00000170 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 46 |==============.F| 00000180 69 65 6c 64 73 20 64 65 66 69 6e 65 64 20 74 6f |ields defined to| 00000190 20 62 65 20 6f 66 20 27 43 61 6c 63 75 6c 61 74 | be of 'Calculat| 000001a0 65 64 27 20 74 79 70 65 20 64 69 73 70 6c 61 79 |ed' type display| 000001b0 20 61 20 6e 75 6d 65 72 69 63 20 72 65 73 75 6c | a numeric resul| 000001c0 74 20 64 65 72 69 76 65 64 0a 66 72 6f 6d 20 6f |t derived.from o| 000001d0 74 68 65 72 20 66 69 65 6c 64 73 20 69 6e 20 74 |ther fields in t| 000001e0 68 65 20 72 65 63 6f 72 64 2e 20 57 68 65 6e 20 |he record. When | 000001f0 74 68 65 20 6d 6f 75 73 65 20 70 6f 69 6e 74 65 |the mouse pointe| 00000200 72 20 69 73 20 6d 6f 76 65 64 20 6f 76 65 72 0a |r is moved over.| 00000210 73 75 63 68 20 61 20 66 69 65 6c 64 20 69 74 20 |such a field it | 00000220 63 68 61 6e 67 65 73 20 69 6e 74 6f 20 61 20 73 |changes into a s| 00000230 68 61 70 65 20 72 65 73 65 6d 62 6c 69 6e 67 20 |hape resembling | 00000240 61 20 70 6f 63 6b 65 74 20 63 61 6c 63 75 6c 61 |a pocket calcula| 00000250 74 6f 72 2e 20 46 69 65 6c 64 73 0a 6f 66 20 27 |tor. Fields.of '| 00000260 43 6f 6d 70 6f 73 69 74 65 27 20 74 79 70 65 20 |Composite' type | 00000270 70 65 72 66 6f 72 6d 20 61 20 73 69 6d 69 6c 61 |perform a simila| 00000280 72 20 66 75 6e 63 74 69 6f 6e 20 62 75 74 20 64 |r function but d| 00000290 69 73 70 6c 61 79 20 61 20 74 65 78 74 75 61 6c |isplay a textual| 000002a0 20 22 76 61 6c 75 65 22 0a 69 6e 73 74 65 61 64 | "value".instead| 000002b0 20 6f 66 20 61 20 6e 75 6d 62 65 72 2e 20 49 6e | of a number. In| 000002c0 20 74 68 69 73 20 63 61 73 65 20 74 68 65 20 6d | this case the m| 000002d0 6f 75 73 65 20 70 6f 69 6e 74 65 72 20 63 68 61 |ouse pointer cha| 000002e0 6e 67 65 73 20 69 6e 74 6f 20 61 20 6c 61 72 67 |nges into a larg| 000002f0 65 0a 22 70 6c 75 73 22 20 73 69 67 6e 2e 20 49 |e."plus" sign. I| 00000300 74 20 69 73 6e 27 74 20 70 6f 73 73 69 62 6c 65 |t isn't possible| 00000310 20 74 6f 20 74 79 70 65 20 64 61 74 61 20 64 69 | to type data di| 00000320 72 65 63 74 6c 79 20 69 6e 74 6f 20 65 69 74 68 |rectly into eith| 00000330 65 72 20 6f 66 20 74 68 65 73 65 0a 73 70 65 63 |er of these.spec| 00000340 69 61 6c 20 74 79 70 65 73 20 6f 66 20 66 69 65 |ial types of fie| 00000350 6c 64 2e 20 54 68 65 20 6c 61 74 74 65 72 20 64 |ld. The latter d| 00000360 6f 20 6e 6f 74 2c 20 73 74 72 69 63 74 6c 79 2c |o not, strictly,| 00000370 20 69 6e 76 6f 6c 76 65 20 22 63 61 6c 63 75 6c | involve "calcul| 00000380 61 74 69 6f 6e 73 22 0a 61 74 20 61 6c 6c 20 62 |ations".at all b| 00000390 75 74 20 62 65 63 61 75 73 65 20 27 43 6f 6d 70 |ut because 'Comp| 000003a0 6f 73 69 74 65 27 20 61 6e 64 20 27 43 61 6c 63 |osite' and 'Calc| 000003b0 75 6c 61 74 65 64 27 20 66 69 65 6c 64 73 20 77 |ulated' fields w| 000003c0 6f 72 6b 20 69 6e 20 74 68 65 20 73 61 6d 65 20 |ork in the same | 000003d0 77 61 79 0a 69 74 20 69 73 20 63 6f 6e 76 65 6e |way.it is conven| 000003e0 69 65 6e 74 20 74 6f 20 64 65 61 6c 20 77 69 74 |ient to deal wit| 000003f0 68 20 74 68 65 6d 20 74 6f 67 65 74 68 65 72 2e |h them together.| 00000400 0a 0a 49 74 20 69 73 20 70 6f 73 73 69 62 6c 65 |..It is possible| 00000410 20 74 6f 20 77 72 69 74 65 20 79 6f 75 72 20 6f | to write your o| 00000420 77 6e 20 66 75 6e 63 74 69 6f 6e 73 20 69 6e 20 |wn functions in | 00000430 42 61 73 69 63 20 61 6e 64 20 6d 61 6b 65 20 75 |Basic and make u| 00000440 73 65 20 6f 66 20 74 68 65 6d 20 69 6e 0a 27 43 |se of them in.'C| 00000450 61 6c 63 75 6c 61 74 65 64 27 20 61 6e 64 20 27 |alculated' and '| 00000460 43 6f 6d 70 6f 73 69 74 65 27 20 66 69 65 6c 64 |Composite' field| 00000470 73 2e 20 54 68 65 20 73 79 73 74 65 6d 20 76 61 |s. The system va| 00000480 72 69 61 62 6c 65 20 54 49 4d 45 24 20 69 73 20 |riable TIME$ is | 00000490 61 6c 73 6f 0a 75 73 65 66 75 6c 20 69 6e 20 74 |also.useful in t| 000004a0 68 69 73 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0a |his connection..| 000004b0 0a 27 43 61 6c 63 75 6c 61 74 65 64 27 20 66 69 |.'Calculated' fi| 000004c0 65 6c 64 73 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |elds.-----------| 000004d0 2d 2d 2d 2d 2d 2d 2d 2d 0a 43 6c 69 63 6b 20 4d |--------.Click M| 000004e0 45 4e 55 20 6f 76 65 72 20 74 68 65 20 66 69 65 |ENU over the fie| 000004f0 6c 64 20 74 6f 20 62 72 69 6e 67 20 75 70 20 74 |ld to bring up t| 00000500 68 65 20 27 46 69 65 6c 64 27 20 73 75 62 6d 65 |he 'Field' subme| 00000510 6e 75 20 61 6e 64 20 6d 6f 76 65 20 72 69 67 68 |nu and move righ| 00000520 74 0a 6f 76 65 72 20 74 68 65 20 66 6f 75 72 74 |t.over the fourt| 00000530 68 20 63 68 6f 69 63 65 20 28 27 43 61 6c 63 75 |h choice ('Calcu| 00000540 6c 61 74 69 6f 6e 73 27 29 2e 20 59 6f 75 20 6d |lations'). You m| 00000550 75 73 74 20 68 61 76 65 20 27 4d 61 6e 61 67 65 |ust have 'Manage| 00000560 72 27 20 61 63 63 65 73 73 0a 72 69 67 68 74 73 |r' access.rights| 00000570 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 64 6f 20 | in order to do | 00000580 74 68 69 73 2c 20 6f 74 68 65 72 77 69 73 65 20 |this, otherwise | 00000590 74 68 65 20 6d 65 6e 75 20 6f 70 74 69 6f 6e 20 |the menu option | 000005a0 69 73 20 73 68 61 64 65 64 2e 20 41 20 64 69 61 |is shaded. A dia| 000005b0 6c 6f 67 75 65 0a 62 6f 78 20 61 70 70 65 61 72 |logue.box appear| 000005c0 73 20 69 6e 74 6f 20 77 68 69 63 68 20 79 6f 75 |s into which you| 000005d0 20 63 61 6e 20 74 79 70 65 20 74 68 65 20 66 6f | can type the fo| 000005e0 72 6d 75 6c 61 20 74 6f 20 62 65 20 75 73 65 64 |rmula to be used| 000005f0 20 74 6f 20 63 61 6c 63 75 6c 61 74 65 20 74 68 | to calculate th| 00000600 65 0a 76 61 6c 75 65 20 6f 66 20 74 68 65 20 66 |e.value of the f| 00000610 69 65 6c 64 2e 0a 0a 53 75 70 70 6f 73 65 20 77 |ield...Suppose w| 00000620 65 20 68 61 76 65 20 66 6f 75 72 20 6e 6f 72 6d |e have four norm| 00000630 61 6c 20 6e 75 6d 65 72 69 63 20 66 69 65 6c 64 |al numeric field| 00000640 73 20 77 68 6f 73 65 20 74 61 67 73 20 61 72 65 |s whose tags are| 00000650 20 4e 6f 31 2c 20 4e 6f 32 2c 20 4e 6f 33 20 61 | No1, No2, No3 a| 00000660 6e 64 0a 4e 6f 34 20 61 6e 64 20 61 20 43 61 6c |nd.No4 and a Cal| 00000670 63 75 6c 61 74 65 64 20 66 69 65 6c 64 20 63 61 |culated field ca| 00000680 6c 6c 65 64 20 41 56 47 45 2e 20 54 68 65 20 64 |lled AVGE. The d| 00000690 69 61 6c 6f 67 75 65 20 62 6f 78 20 77 69 6c 6c |ialogue box will| 000006a0 20 69 6e 69 74 69 61 6c 6c 79 20 73 68 6f 77 3a | initially show:| 000006b0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. | 000006c0 20 20 20 20 20 20 20 20 20 20 20 41 56 47 45 3d | AVGE=| 000006d0 0a 0a 43 6f 6d 70 6c 65 74 65 20 74 68 65 20 66 |..Complete the f| 000006e0 6f 72 6d 75 6c 61 20 73 6f 20 74 68 61 74 20 69 |ormula so that i| 000006f0 74 20 72 65 61 64 73 3a 20 41 56 47 45 3d 28 4e |t reads: AVGE=(N| 00000700 6f 31 2b 4e 6f 32 2b 4e 6f 33 2b 4e 6f 34 29 2f |o1+No2+No3+No4)/| 00000710 34 20 61 6e 64 20 63 6c 69 63 6b 0a 6f 6e 20 27 |4 and click.on '| 00000720 4f 4b 27 20 6f 72 20 74 79 70 65 20 52 45 54 55 |OK' or type RETU| 00000730 52 4e 2e 20 46 72 6f 6d 20 6e 6f 77 20 6f 6e 2c |RN. From now on,| 00000740 20 77 68 65 6e 65 76 65 72 20 61 6e 79 20 6f 66 | whenever any of| 00000750 20 74 68 65 20 6e 75 6d 62 65 72 73 20 69 6e 20 | the numbers in | 00000760 4e 6f 31 2c 0a 4e 6f 32 2c 20 4e 6f 33 20 61 6e |No1,.No2, No3 an| 00000770 64 20 4e 6f 34 20 61 72 65 20 65 6e 74 65 72 65 |d No4 are entere| 00000780 64 20 6f 72 20 61 6c 74 65 72 65 64 20 74 68 65 |d or altered the| 00000790 20 63 6f 6e 74 65 6e 74 73 20 6f 66 20 41 56 47 | contents of AVG| 000007a0 45 20 77 69 6c 6c 20 62 65 20 75 70 64 61 74 65 |E will be update| 000007b0 64 0a 69 6e 20 61 63 63 6f 72 64 61 6e 63 65 20 |d.in accordance | 000007c0 77 69 74 68 20 74 68 65 20 66 6f 72 6d 75 6c 61 |with the formula| 000007d0 2e 20 54 6f 20 6d 61 6b 65 20 66 6f 72 6d 75 6c |. To make formul| 000007e0 61 20 65 6e 74 72 79 20 65 61 73 69 65 72 2c 20 |a entry easier, | 000007f0 74 68 65 20 64 69 61 6c 6f 67 75 65 0a 62 6f 78 |the dialogue.box| 00000800 20 77 6f 72 6b 73 20 6c 69 6b 65 20 74 68 65 20 | works like the | 00000810 4d 61 74 63 68 20 77 69 6e 64 6f 77 20 69 2e 65 |Match window i.e| 00000820 2e 20 63 6c 69 63 6b 69 6e 67 20 6f 6e 20 61 20 |. clicking on a | 00000830 66 69 65 6c 64 20 69 6e 20 74 68 65 20 6d 61 69 |field in the mai| 00000840 6e 20 77 69 6e 64 6f 77 0a 77 68 69 6c 73 74 20 |n window.whilst | 00000850 74 68 65 20 64 69 61 6c 6f 67 75 65 20 62 6f 78 |the dialogue box| 00000860 20 69 73 20 6f 70 65 6e 20 63 61 75 73 65 73 20 | is open causes | 00000870 74 68 65 20 74 61 67 20 6f 66 20 74 68 65 20 66 |the tag of the f| 00000880 69 65 6c 64 20 74 6f 20 62 65 20 63 6f 70 69 65 |ield to be copie| 00000890 64 0a 69 6e 74 6f 20 74 68 65 20 66 6f 72 6d 75 |d.into the formu| 000008a0 6c 61 2e 0a 0a 54 68 65 20 64 65 66 61 75 6c 74 |la...The default| 000008b0 20 73 65 74 74 69 6e 67 20 69 73 20 73 75 63 68 | setting is such| 000008c0 20 74 68 61 74 20 65 6e 74 65 72 69 6e 67 20 6f | that entering o| 000008d0 72 20 61 6c 74 65 72 69 6e 67 20 61 20 66 6f 72 |r altering a for| 000008e0 6d 75 6c 61 20 61 66 66 65 63 74 73 20 6f 6e 6c |mula affects onl| 000008f0 79 0a 74 68 6f 73 65 20 72 65 63 6f 72 64 73 20 |y.those records | 00000900 77 68 69 63 68 20 61 72 65 20 61 64 64 65 64 20 |which are added | 00000910 6f 72 20 61 6c 74 65 72 65 64 20 61 66 74 65 72 |or altered after| 00000920 20 74 68 65 20 66 6f 72 6d 75 6c 61 20 65 6e 74 | the formula ent| 00000930 72 79 2f 63 68 61 6e 67 65 2e 20 54 68 65 0a 63 |ry/change. The.c| 00000940 68 61 6e 67 65 73 20 63 61 6e 20 62 65 20 6d 61 |hanges can be ma| 00000950 64 65 20 72 65 74 72 6f 73 70 65 63 74 69 76 65 |de retrospective| 00000960 20 62 79 20 73 65 74 74 69 6e 67 20 74 68 65 20 | by setting the | 00000970 6f 70 74 69 6f 6e 20 62 75 74 74 6f 6e 20 6f 6e |option button on| 00000980 20 74 68 65 20 0a 66 6f 72 6d 75 6c 61 20 65 6e | the .formula en| 00000990 74 72 79 20 77 69 6e 64 6f 77 2e 20 4f 6e 20 63 |try window. On c| 000009a0 6c 69 63 6b 69 6e 67 20 4f 4b 20 79 6f 75 20 77 |licking OK you w| 000009b0 69 6c 6c 20 74 68 65 6e 20 62 65 20 61 73 6b 65 |ill then be aske| 000009c0 64 20 74 6f 20 63 6f 6e 66 69 72 6d 20 74 68 61 |d to confirm tha| 000009d0 74 0a 79 6f 75 20 77 61 6e 74 20 70 72 65 76 69 |t.you want previ| 000009e0 6f 75 73 20 72 65 63 6f 72 64 73 20 74 6f 20 62 |ous records to b| 000009f0 65 20 6d 61 64 65 20 63 6f 6e 73 69 73 74 65 6e |e made consisten| 00000a00 74 20 77 69 74 68 20 74 68 65 20 66 6f 72 6d 75 |t with the formu| 00000a10 6c 61 20 79 6f 75 20 68 61 76 65 0a 6a 75 73 74 |la you have.just| 00000a20 20 65 6e 74 65 72 65 64 2e 20 43 68 61 6e 67 65 | entered. Change| 00000a30 73 20 61 66 66 65 63 74 20 74 68 65 20 63 75 72 |s affect the cur| 00000a40 72 65 6e 74 20 73 75 62 66 69 6c 65 20 6f 6e 6c |rent subfile onl| 00000a50 79 2c 20 62 75 74 20 63 61 6e 20 62 65 20 65 61 |y, but can be ea| 00000a60 73 69 6c 79 0a 69 6d 70 6c 65 6d 65 6e 74 65 64 |sily.implemented| 00000a70 20 69 6e 20 6f 74 68 65 72 20 73 75 62 66 69 6c | in other subfil| 00000a80 65 73 20 62 79 20 63 68 61 6e 67 69 6e 67 20 74 |es by changing t| 00000a90 6f 20 74 68 65 20 72 65 71 75 69 72 65 64 20 73 |o the required s| 00000aa0 75 62 66 69 6c 65 2c 20 63 61 6c 6c 69 6e 67 0a |ubfile, calling.| 00000ab0 75 70 20 74 68 65 20 66 6f 72 6d 75 6c 61 20 65 |up the formula e| 00000ac0 6e 74 72 79 20 77 69 6e 64 6f 77 2c 20 73 65 6c |ntry window, sel| 00000ad0 65 63 74 69 6e 67 20 74 68 65 20 6f 70 74 69 6f |ecting the optio| 00000ae0 6e 20 62 75 74 74 6f 6e 20 61 6e 64 20 63 6c 69 |n button and cli| 00000af0 63 6b 69 6e 67 20 4f 4b 2e 0a 0a 59 6f 75 20 6d |cking OK...You m| 00000b00 69 67 68 74 20 74 68 69 6e 6b 20 74 68 61 74 20 |ight think that | 00000b10 74 68 69 73 20 70 72 6f 63 65 73 73 20 69 73 20 |this process is | 00000b20 6f 6e 6c 79 20 61 70 70 6c 69 63 61 62 6c 65 20 |only applicable | 00000b30 74 6f 20 6e 75 6d 65 72 69 63 20 66 69 65 6c 64 |to numeric field| 00000b40 73 2c 20 62 75 74 0a 79 6f 75 20 77 6f 75 6c 64 |s, but.you would| 00000b50 20 62 65 20 77 72 6f 6e 67 21 20 41 20 6e 6f 6e | be wrong! A non| 00000b60 2d 6e 75 6d 65 72 69 63 20 66 69 65 6c 64 20 6d |-numeric field m| 00000b70 61 79 20 62 65 20 73 70 65 63 69 66 69 65 64 20 |ay be specified | 00000b80 69 6e 20 74 68 65 20 66 6f 72 6d 75 6c 61 20 49 |in the formula I| 00000b90 46 0a 69 74 20 69 73 20 6c 69 6e 6b 65 64 20 74 |F.it is linked t| 00000ba0 6f 20 61 20 76 61 6c 69 64 61 74 69 6f 6e 20 74 |o a validation t| 00000bb0 61 62 6c 65 2e 20 54 6f 20 62 65 20 6f 66 20 61 |able. To be of a| 00000bc0 6e 79 20 75 73 65 20 74 68 65 72 65 20 6d 75 73 |ny use there mus| 00000bd0 74 20 62 65 20 20 6e 75 6d 65 72 69 63 0a 64 61 |t be numeric.da| 00000be0 74 61 20 69 6e 20 74 68 65 20 63 6f 6c 75 6d 6e |ta in the column| 00000bf0 20 6f 66 20 74 68 65 20 76 61 6c 69 64 61 74 69 | of the validati| 00000c00 6f 6e 20 74 61 62 6c 65 20 69 6d 6d 65 64 69 61 |on table immedia| 00000c10 74 65 6c 79 20 66 6f 6c 6c 6f 77 69 6e 67 20 74 |tely following t| 00000c20 68 65 20 6f 6e 65 20 74 6f 0a 77 68 69 63 68 20 |he one to.which | 00000c30 74 68 65 20 66 69 65 6c 64 20 69 73 20 6c 69 6e |the field is lin| 00000c40 6b 65 64 2e 20 28 53 65 65 20 27 56 61 6c 69 64 |ked. (See 'Valid| 00000c50 61 74 69 6f 6e 27 20 66 6f 72 20 61 20 64 65 73 |ation' for a des| 00000c60 63 72 69 70 74 69 6f 6e 20 6f 66 0a 76 61 6c 69 |cription of.vali| 00000c70 64 61 74 69 6f 6e 20 74 61 62 6c 65 73 20 61 6e |dation tables an| 00000c80 64 20 66 69 65 6c 64 2d 6c 69 6e 6b 69 6e 67 2e |d field-linking.| 00000c90 29 20 53 75 70 70 6f 73 65 2c 20 66 6f 72 20 65 |) Suppose, for e| 00000ca0 78 61 6d 70 6c 65 2c 20 77 65 20 68 61 76 65 20 |xample, we have | 00000cb0 66 69 65 6c 64 73 0a 69 6e 20 61 20 73 74 75 64 |fields.in a stud| 00000cc0 65 6e 74 20 72 65 63 6f 72 64 20 66 6f 72 20 41 |ent record for A| 00000cd0 2d 6c 65 76 65 6c 20 65 78 61 6d 20 67 72 61 64 |-level exam grad| 00000ce0 65 73 2c 20 74 68 65 20 66 69 65 6c 64 20 74 61 |es, the field ta| 00000cf0 67 73 20 62 65 69 6e 67 20 41 31 2c 20 41 32 2c |gs being A1, A2,| 00000d00 0a 41 33 2c 20 41 34 2e 20 54 68 65 20 67 72 61 |.A3, A4. The gra| 00000d10 64 65 73 20 61 72 65 20 6e 6f 6e 2d 6e 75 6d 65 |des are non-nume| 00000d20 72 69 63 20 62 75 74 20 74 68 65 79 20 6d 61 70 |ric but they map| 00000d30 20 6f 6e 74 6f 20 74 68 65 20 6e 75 6d 65 72 69 | onto the numeri| 00000d40 63 20 22 70 6f 69 6e 74 73 0a 73 79 73 74 65 6d |c "points.system| 00000d50 22 20 77 68 69 63 68 20 75 6e 69 76 65 72 73 69 |" which universi| 00000d60 74 69 65 73 20 75 73 65 20 74 6f 20 63 6f 6e 74 |ties use to cont| 00000d70 72 6f 6c 20 65 6e 74 72 79 2e 20 54 68 65 20 72 |rol entry. The r| 00000d80 65 6c 61 74 69 6f 6e 73 68 69 70 20 6f 66 20 67 |elationship of g| 00000d90 72 61 64 65 73 0a 74 6f 20 70 6f 69 6e 74 73 20 |rades.to points | 00000da0 69 73 20 61 73 20 66 6f 6c 6c 6f 77 73 3a 2d 0a |is as follows:-.| 00000db0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000dc0 20 20 20 20 20 20 20 20 20 47 72 61 64 65 20 20 | Grade | 00000dd0 20 20 20 20 20 20 20 20 50 6f 69 6e 74 73 0a 20 | Points. | 00000de0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000df0 20 20 20 20 20 20 20 20 3d 3d 3d 3d 3d 20 20 20 | ===== | 00000e00 20 20 20 20 20 20 20 3d 3d 3d 3d 3d 3d 0a 20 20 | ======. | 00000e10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000e20 20 20 20 20 20 20 20 20 20 41 20 20 20 20 20 20 | A | 00000e30 20 20 20 20 20 20 20 20 31 30 0a 20 20 20 20 20 | 10. | 00000e40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000e50 20 20 20 20 20 20 42 20 20 20 20 20 20 20 20 20 | B | 00000e60 20 20 20 20 20 20 38 0a 20 20 20 20 20 20 20 20 | 8. | 00000e70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000e80 20 20 20 43 20 20 20 20 20 20 20 20 20 20 20 20 | C | 00000e90 20 20 20 36 0a 20 20 20 20 20 20 20 20 20 20 20 | 6. | 00000ea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000eb0 44 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |D | 00000ec0 34 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |4. | 00000ed0 20 20 20 20 20 20 20 20 20 20 20 20 20 45 20 20 | E | 00000ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 32 0a 0a | 2..| 00000ef0 41 20 76 61 6c 69 64 61 74 69 6f 6e 20 74 61 62 |A validation tab| 00000f00 6c 65 20 63 6f 75 6c 64 20 62 65 20 73 65 74 20 |le could be set | 00000f10 75 70 20 77 69 74 68 20 74 68 65 20 67 72 61 64 |up with the grad| 00000f20 65 73 20 69 6e 20 63 6f 6c 75 6d 6e 20 30 20 61 |es in column 0 a| 00000f30 6e 64 20 74 68 65 0a 65 71 75 69 76 61 6c 65 6e |nd the.equivalen| 00000f40 74 20 70 6f 69 6e 74 73 20 69 6e 20 63 6f 6c 75 |t points in colu| 00000f50 6d 6e 20 31 2e 20 45 61 63 68 20 6f 66 20 66 69 |mn 1. Each of fi| 00000f60 65 6c 64 73 20 41 31 2d 41 34 20 77 6f 75 6c 64 |elds A1-A4 would| 00000f70 20 62 65 20 6c 69 6e 6b 65 64 20 74 6f 0a 63 6f | be linked to.co| 00000f80 6c 75 6d 6e 20 30 2e 20 41 20 66 75 72 74 68 65 |lumn 0. A furthe| 00000f90 72 20 66 69 65 6c 64 20 6f 66 20 74 79 70 65 20 |r field of type | 00000fa0 36 20 28 43 61 6c 63 75 6c 61 74 65 64 29 20 77 |6 (Calculated) w| 00000fb0 6f 75 6c 64 20 62 65 20 63 72 65 61 74 65 64 20 |ould be created | 00000fc0 74 6f 20 68 6f 6c 64 0a 74 68 65 20 70 6f 69 6e |to hold.the poin| 00000fd0 74 73 20 73 63 6f 72 65 2e 20 4c 65 74 27 73 20 |ts score. Let's | 00000fe0 73 75 70 70 6f 73 65 20 74 68 69 73 20 68 61 73 |suppose this has| 00000ff0 20 74 68 65 20 74 61 67 20 50 54 53 2e 20 55 73 | the tag PTS. Us| 00001000 65 20 74 68 65 20 6d 65 74 68 6f 64 20 67 69 76 |e the method giv| 00001010 65 6e 0a 61 62 6f 76 65 20 74 6f 20 61 73 73 6f |en.above to asso| 00001020 63 69 61 74 65 20 74 68 69 73 20 66 69 65 6c 64 |ciate this field| 00001030 20 77 69 74 68 20 74 68 65 20 66 6f 72 6d 75 6c | with the formul| 00001040 61 20 50 54 53 3d 41 31 2b 41 32 2b 41 33 2b 41 |a PTS=A1+A2+A3+A| 00001050 34 2e 20 46 72 6f 6d 20 6e 6f 77 20 6f 6e 0a 65 |4. From now on.e| 00001060 6e 74 65 72 69 6e 67 20 6f 72 20 63 68 61 6e 67 |ntering or chang| 00001070 69 6e 67 20 74 68 65 20 6c 65 74 74 65 72 20 67 |ing the letter g| 00001080 72 61 64 65 73 20 69 6e 20 41 31 2d 41 35 20 77 |rades in A1-A5 w| 00001090 69 6c 6c 20 63 61 75 73 65 20 74 68 65 20 70 6f |ill cause the po| 000010a0 69 6e 74 73 20 73 63 6f 72 65 0a 74 6f 20 62 65 |ints score.to be| 000010b0 20 75 70 64 61 74 65 64 20 69 6e 20 50 54 53 2e | updated in PTS.| 000010c0 0a 0a 41 20 66 75 72 74 68 65 72 20 66 65 61 74 |..A further feat| 000010d0 75 72 65 20 6f 66 20 43 61 6c 63 75 6c 61 74 65 |ure of Calculate| 000010e0 64 20 66 69 65 6c 64 73 20 69 73 20 74 68 65 69 |d fields is thei| 000010f0 72 20 75 73 65 20 77 69 74 68 20 54 69 6d 65 20 |r use with Time | 00001100 66 69 65 6c 64 73 20 28 62 79 0a 77 68 69 63 68 |fields (by.which| 00001110 20 77 65 20 6d 65 61 6e 20 65 64 69 74 61 62 6c | we mean editabl| 00001120 65 20 54 69 6d 65 20 66 69 65 6c 64 73 20 69 6e |e Time fields in| 00001130 20 74 68 65 20 27 44 61 74 61 27 20 63 6c 61 73 | the 'Data' clas| 00001140 73 2c 20 6e 6f 74 20 74 68 65 20 63 75 72 72 65 |s, not the curre| 00001150 6e 74 20 74 69 6d 65 0a 6f 66 20 64 61 79 20 66 |nt time.of day f| 00001160 69 65 6c 64 20 70 72 6f 76 69 64 65 64 20 69 6e |ield provided in| 00001170 20 74 68 65 20 27 53 74 61 6d 70 27 20 63 6c 61 | the 'Stamp' cla| 00001180 73 73 20 28 73 65 65 20 62 65 6c 6f 77 29 2e 20 |ss (see below). | 00001190 49 66 20 74 68 65 20 74 61 67 20 6f 66 20 73 75 |If the tag of su| 000011a0 63 68 20 61 0a 66 69 65 6c 64 20 69 73 20 69 6e |ch a.field is in| 000011b0 63 6c 75 64 65 64 20 69 6e 20 61 20 63 61 6c 63 |cluded in a calc| 000011c0 75 6c 61 74 69 6f 6e 20 66 6f 72 6d 75 6c 61 20 |ulation formula | 000011d0 69 74 20 77 69 6c 6c 20 62 65 20 63 6f 6e 76 65 |it will be conve| 000011e0 72 74 65 64 20 69 6e 74 6f 0a 73 65 63 6f 6e 64 |rted into.second| 000011f0 73 2e 20 54 68 75 73 20 61 20 43 61 6c 63 75 6c |s. Thus a Calcul| 00001200 61 74 65 64 20 66 69 65 6c 64 20 28 44 49 46 46 |ated field (DIFF| 00001210 29 20 63 6f 75 6c 64 20 75 73 65 20 74 77 6f 20 |) could use two | 00001220 54 69 6d 65 20 66 69 65 6c 64 73 2c 20 54 49 4d |Time fields, TIM| 00001230 31 20 61 6e 64 0a 54 49 4d 32 2c 20 69 6e 20 74 |1 and.TIM2, in t| 00001240 68 65 20 66 6f 72 6d 75 6c 61 20 44 49 46 46 3d |he formula DIFF=| 00001250 54 49 4d 31 2d 54 49 4d 32 20 61 6e 64 20 50 6f |TIM1-TIM2 and Po| 00001260 77 65 72 62 61 73 65 20 77 6f 75 6c 64 20 6b 65 |werbase would ke| 00001270 65 70 20 44 49 46 46 20 75 70 64 61 74 65 64 20 |ep DIFF updated | 00001280 74 6f 0a 73 68 6f 77 20 74 68 65 20 64 69 66 66 |to.show the diff| 00001290 65 72 65 6e 63 65 20 69 6e 20 73 65 63 6f 6e 64 |erence in second| 000012a0 73 20 62 65 74 77 65 65 6e 20 74 68 65 20 74 77 |s between the tw| 000012b0 6f 20 74 69 6d 65 73 2e 20 0a 0a 27 43 6f 6d 70 |o times. ..'Comp| 000012c0 6f 73 69 74 65 27 20 66 69 65 6c 64 73 0a 2d 2d |osite' fields.--| 000012d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000012e0 0a 43 6c 69 63 6b 20 4d 45 4e 55 20 6f 76 65 72 |.Click MENU over| 000012f0 20 74 68 65 20 66 69 65 6c 64 20 74 6f 20 62 72 | the field to br| 00001300 69 6e 67 20 75 70 20 74 68 65 20 27 46 69 65 6c |ing up the 'Fiel| 00001310 64 27 20 73 75 62 6d 65 6e 75 20 61 6e 64 20 6d |d' submenu and m| 00001320 6f 76 65 20 72 69 67 68 74 0a 6f 76 65 72 20 74 |ove right.over t| 00001330 68 65 20 66 69 66 74 68 20 63 68 6f 69 63 65 20 |he fifth choice | 00001340 28 27 43 6f 6d 62 69 6e 65 20 66 69 65 6c 64 73 |('Combine fields| 00001350 27 29 2e 20 59 6f 75 20 6d 75 73 74 20 68 61 76 |'). You must hav| 00001360 65 20 27 4d 61 6e 61 67 65 72 27 20 61 63 63 65 |e 'Manager' acce| 00001370 73 73 0a 72 69 67 68 74 73 20 69 6e 20 6f 72 64 |ss.rights in ord| 00001380 65 72 20 74 6f 20 64 6f 20 74 68 69 73 2c 20 6f |er to do this, o| 00001390 74 68 65 72 77 69 73 65 20 74 68 65 20 6d 65 6e |therwise the men| 000013a0 75 20 6f 70 74 69 6f 6e 20 69 73 20 73 68 61 64 |u option is shad| 000013b0 65 64 2e 20 41 20 64 69 61 6c 6f 67 75 65 0a 62 |ed. A dialogue.b| 000013c0 6f 78 20 61 70 70 65 61 72 73 20 69 6e 74 6f 20 |ox appears into | 000013d0 77 68 69 63 68 20 79 6f 75 20 63 61 6e 20 74 79 |which you can ty| 000013e0 70 65 20 74 68 65 20 66 6f 72 6d 75 6c 61 20 74 |pe the formula t| 000013f0 6f 20 62 65 20 75 73 65 64 20 74 6f 20 22 63 61 |o be used to "ca| 00001400 6c 63 75 6c 61 74 65 22 0a 74 68 65 20 76 61 6c |lculate".the val| 00001410 75 65 20 6f 66 20 74 68 65 20 66 69 65 6c 64 2e |ue of the field.| 00001420 20 46 6f 72 6d 75 6c 61 20 65 6e 74 72 79 20 69 | Formula entry i| 00001430 73 20 73 69 6d 69 6c 61 72 20 74 6f 20 74 68 61 |s similar to tha| 00001440 74 20 66 6f 72 20 27 43 61 6c 63 75 6c 61 74 65 |t for 'Calculate| 00001450 64 27 0a 66 69 65 6c 64 73 20 65 78 63 65 70 74 |d'.fields except| 00001460 20 74 68 61 74 20 6f 6e 6c 79 20 73 74 72 69 6e | that only strin| 00001470 67 20 6f 70 65 72 61 74 69 6f 6e 73 20 61 72 65 |g operations are| 00001480 20 61 6c 6c 6f 77 65 64 2e 20 54 68 65 20 6f 6e | allowed. The on| 00001490 65 20 6d 6f 73 74 0a 66 72 65 71 75 65 6e 74 6c |e most.frequentl| 000014a0 79 20 75 73 65 64 20 77 69 6c 6c 20 62 65 20 27 |y used will be '| 000014b0 2b 27 20 62 75 74 20 79 6f 75 20 6d 61 79 20 75 |+' but you may u| 000014c0 73 65 20 74 68 65 20 42 41 53 49 43 20 73 74 61 |se the BASIC sta| 000014d0 74 65 6d 65 6e 74 73 20 4c 45 46 54 24 2c 0a 52 |tements LEFT$,.R| 000014e0 49 47 48 54 24 20 61 6e 64 20 4d 49 44 24 2c 20 |IGHT$ and MID$, | 000014f0 61 73 20 77 65 6c 6c 20 61 73 20 6c 69 74 65 72 |as well as liter| 00001500 61 6c 20 73 74 72 69 6e 67 73 2e 20 0a 0a 41 73 |al strings. ..As| 00001510 20 61 6e 20 65 78 61 6d 70 6c 65 20 6f 66 20 75 | an example of u| 00001520 73 65 20 79 6f 75 20 6d 69 67 68 74 20 68 61 76 |se you might hav| 00001530 65 20 74 68 72 65 65 20 66 69 65 6c 64 73 20 69 |e three fields i| 00001540 6e 20 61 20 64 61 74 61 62 61 73 65 20 63 61 6c |n a database cal| 00001550 6c 65 64 20 53 4e 41 4d 2c 0a 46 4e 41 4d 20 61 |led SNAM,.FNAM a| 00001560 6e 64 20 4d 4e 41 4d 20 66 6f 72 20 73 75 72 6e |nd MNAM for surn| 00001570 61 6d 65 2c 20 66 6f 72 65 6e 61 6d 65 20 61 6e |ame, forename an| 00001580 64 20 6d 69 64 64 6c 65 20 6e 61 6d 65 2e 20 41 |d middle name. A| 00001590 64 64 72 65 73 73 69 6e 67 20 6c 65 74 74 65 72 |ddressing letter| 000015a0 73 0a 72 65 71 75 69 72 65 73 20 61 6e 6f 74 68 |s.requires anoth| 000015b0 65 72 20 66 69 65 6c 64 20 63 6f 6e 74 61 69 6e |er field contain| 000015c0 69 6e 67 20 6a 75 73 74 20 74 68 65 20 66 69 72 |ing just the fir| 000015d0 73 74 20 74 77 6f 20 6f 66 20 74 68 65 73 65 2c |st two of these,| 000015e0 20 62 75 74 20 69 6e 20 74 68 65 0a 72 65 76 65 | but in the.reve| 000015f0 72 73 65 20 6f 72 64 65 72 2e 20 59 6f 75 20 63 |rse order. You c| 00001600 6f 75 6c 64 20 74 68 65 72 65 66 6f 72 65 20 64 |ould therefore d| 00001610 65 66 69 6e 65 20 61 20 27 43 6f 6d 70 6f 73 69 |efine a 'Composi| 00001620 74 65 27 20 66 69 65 6c 64 20 63 61 6c 6c 65 64 |te' field called| 00001630 20 4e 41 4d 45 0a 61 6e 64 20 65 6e 74 65 72 20 | NAME.and enter | 00001640 74 68 65 20 66 6f 72 6d 75 6c 61 3a 0a 20 20 20 |the formula:. | 00001650 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001660 20 20 20 20 20 20 4e 41 4d 45 3d 46 4e 41 4d 2b | NAME=FNAM+| 00001670 22 20 22 2b 53 4e 41 4d 0a 0a 4e 6f 74 65 20 74 |" "+SNAM..Note t| 00001680 68 65 20 75 73 65 20 6f 66 20 61 20 6c 69 74 65 |he use of a lite| 00001690 72 61 6c 20 73 74 72 69 6e 67 20 74 6f 20 70 6c |ral string to pl| 000016a0 61 63 65 20 61 20 73 70 61 63 65 20 62 65 74 77 |ace a space betw| 000016b0 65 65 6e 20 74 68 65 20 6e 61 6d 65 73 2e 0a 0a |een the names...| 000016c0 43 6f 6d 70 6f 73 69 74 65 20 66 69 65 6c 64 73 |Composite fields| 000016d0 2c 20 6c 69 6b 65 20 43 61 6c 63 75 6c 61 74 65 |, like Calculate| 000016e0 64 20 66 69 65 6c 64 73 2c 20 6d 61 79 20 62 65 |d fields, may be| 000016f0 20 75 73 65 64 20 69 6e 20 63 6f 6e 6a 75 6e 63 | used in conjunc| 00001700 74 69 6f 6e 20 77 69 74 68 0a 54 69 6d 65 20 66 |tion with.Time f| 00001710 69 65 6c 64 73 20 74 6f 20 70 65 72 66 6f 72 6d |ields to perform| 00001720 20 67 65 6e 75 69 6e 65 20 22 63 6c 6f 63 6b 20 | genuine "clock | 00001730 61 72 69 74 68 6d 65 74 69 63 22 2e 20 52 65 66 |arithmetic". Ref| 00001740 65 72 72 69 6e 67 20 74 6f 20 74 68 65 20 65 78 |erring to the ex| 00001750 61 6d 70 6c 65 0a 61 62 6f 76 65 2c 20 75 73 69 |ample.above, usi| 00001760 6e 67 20 44 49 46 46 3d 54 49 4d 31 2d 54 49 4d |ng DIFF=TIM1-TIM| 00001770 32 2c 20 69 66 20 77 65 20 61 74 74 61 63 68 65 |2, if we attache| 00001780 64 20 74 68 65 20 66 6f 72 6d 75 6c 61 20 74 6f |d the formula to| 00001790 20 61 20 43 6f 6d 70 6f 73 69 74 65 0a 66 69 65 | a Composite.fie| 000017a0 6c 64 20 74 68 65 20 6c 61 74 74 65 72 20 77 6f |ld the latter wo| 000017b0 75 6c 64 20 73 68 6f 77 20 74 68 65 20 64 69 66 |uld show the dif| 000017c0 66 65 72 65 6e 63 65 20 69 6e 20 68 6f 75 72 73 |ference in hours| 000017d0 2c 20 6d 69 6e 75 74 65 73 20 61 6e 64 20 73 65 |, minutes and se| 000017e0 63 6f 6e 64 73 2e 0a 54 68 65 20 6d 65 74 68 6f |conds..The metho| 000017f0 64 20 63 61 6e 20 62 65 20 65 78 74 65 6e 64 65 |d can be extende| 00001800 64 20 74 6f 20 6a 6f 62 73 20 73 75 63 68 20 61 |d to jobs such a| 00001810 73 20 61 76 65 72 61 67 69 6e 67 20 74 69 6d 65 |s averaging time| 00001820 73 2c 20 65 2e 67 2e 20 77 69 74 68 20 61 0a 66 |s, e.g. with a.f| 00001830 6f 72 6d 75 6c 61 20 73 75 63 68 20 61 73 20 41 |ormula such as A| 00001840 56 45 3d 28 54 49 4d 31 2b 54 49 4d 32 2b 54 49 |VE=(TIM1+TIM2+TI| 00001850 4d 33 29 2f 33 2e 0a 0a 41 73 20 77 69 74 68 20 |M3)/3...As with | 00001860 27 43 61 6c 63 75 6c 61 74 65 64 27 20 66 69 65 |'Calculated' fie| 00001870 6c 64 73 20 75 70 64 61 74 69 6e 67 20 6f 63 63 |lds updating occ| 00001880 75 72 73 20 61 66 74 65 72 20 65 64 69 74 69 6e |urs after editin| 00001890 67 20 61 20 66 69 65 6c 64 20 77 68 6f 73 65 20 |g a field whose | 000018a0 74 61 67 0a 61 70 70 65 61 72 73 20 69 6e 20 74 |tag.appears in t| 000018b0 68 65 20 61 74 74 61 63 68 65 64 20 66 6f 72 6d |he attached form| 000018c0 75 6c 61 2e 20 54 68 75 73 20 4e 41 4d 45 20 77 |ula. Thus NAME w| 000018d0 6f 75 6c 64 20 62 65 20 75 70 64 61 74 65 64 20 |ould be updated | 000018e0 61 66 74 65 72 20 63 68 61 6e 67 65 73 20 74 6f |after changes to| 000018f0 0a 46 4e 41 4d 20 6f 72 20 53 4e 41 4d 20 61 6e |.FNAM or SNAM an| 00001900 64 20 44 49 46 46 20 61 66 74 65 72 20 63 68 61 |d DIFF after cha| 00001910 6e 67 65 73 20 74 6f 20 54 49 4d 31 20 6f 72 20 |nges to TIM1 or | 00001920 54 49 4d 32 2e 20 59 6f 75 20 63 61 6e 2c 20 68 |TIM2. You can, h| 00001930 6f 77 65 76 65 72 2c 20 68 61 76 65 0a 27 43 6f |owever, have.'Co| 00001940 6d 70 6f 73 69 74 65 27 20 66 69 65 6c 64 73 20 |mposite' fields | 00001950 77 68 69 63 68 20 6d 61 6b 65 20 75 73 65 20 6f |which make use o| 00001960 66 20 74 68 65 20 42 61 73 69 63 20 73 79 73 74 |f the Basic syst| 00001970 65 6d 20 76 61 72 69 61 62 6c 65 20 54 49 4d 45 |em variable TIME| 00001980 24 2e 20 54 68 75 73 20 61 0a 66 69 65 64 20 44 |$. Thus a.fied D| 00001990 41 59 20 63 6f 75 6c 64 20 62 65 20 6c 69 6e 6b |AY could be link| 000019a0 65 64 20 74 6f 20 74 68 65 20 66 6f 72 6d 75 6c |ed to the formul| 000019b0 61 20 44 41 59 3d 4c 45 46 54 24 28 54 49 4d 45 |a DAY=LEFT$(TIME| 000019c0 24 2c 33 29 20 74 6f 20 6d 61 6b 65 20 69 74 20 |$,3) to make it | 000019d0 73 68 6f 77 0a 4d 6f 6e 2c 20 54 75 65 20 65 74 |show.Mon, Tue et| 000019e0 63 2e 20 4e 6f 20 66 69 65 6c 64 20 74 61 67 73 |c. No field tags| 000019f0 20 61 72 65 20 72 65 66 65 72 72 65 64 20 74 6f | are referred to| 00001a00 20 69 6e 20 74 68 65 20 66 6f 72 6d 75 6c 61 20 | in the formula | 00001a10 73 6f 20 77 68 65 6e 20 64 6f 65 73 20 44 41 59 |so when does DAY| 00001a20 0a 67 65 74 20 75 70 64 61 74 65 64 3f 20 54 68 |.get updated? Th| 00001a30 65 20 61 6e 73 77 65 72 20 66 6f 72 20 74 68 69 |e answer for thi| 00001a40 73 2c 20 6f 72 20 61 6e 79 20 6f 74 68 65 72 20 |s, or any other | 00001a50 27 43 6f 6d 70 6f 73 69 74 65 27 20 66 69 65 6c |'Composite' fiel| 00001a60 64 20 75 73 69 6e 67 0a 54 49 4d 45 24 2c 20 69 |d using.TIME$, i| 00001a70 73 20 74 68 61 74 20 75 70 64 61 74 69 6e 67 20 |s that updating | 00001a80 6f 63 63 75 72 73 20 69 6d 6d 65 64 69 61 74 65 |occurs immediate| 00001a90 6c 79 20 62 65 66 6f 72 65 20 64 69 73 70 6c 61 |ly before displa| 00001aa0 79 69 6e 67 20 74 68 65 20 72 65 63 6f 72 64 20 |ying the record | 00001ab0 73 6f 0a 74 68 61 74 20 74 68 65 20 69 6e 66 6f |so.that the info| 00001ac0 72 6d 61 74 69 6f 6e 20 69 73 20 63 6f 72 72 65 |rmation is corre| 00001ad0 63 74 20 61 74 20 74 68 61 74 20 74 69 6d 65 2e |ct at that time.| 00001ae0 0a 0a 55 73 65 72 20 66 75 6e 63 74 69 6f 6e 73 |..User functions| 00001af0 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a |.==============.| 00001b00 54 68 65 73 65 20 61 72 65 20 66 75 6e 63 74 69 |These are functi| 00001b10 6f 6e 73 2c 20 77 72 69 74 74 65 6e 20 69 6e 20 |ons, written in | 00001b20 42 61 73 69 63 2c 20 77 68 69 63 68 20 61 63 63 |Basic, which acc| 00001b30 65 70 74 20 66 69 65 6c 64 20 74 61 67 73 20 61 |ept field tags a| 00001b40 73 20 70 61 72 61 6d 65 74 65 72 73 0a 61 6e 64 |s parameters.and| 00001b50 20 63 61 6e 20 62 65 20 69 6e 63 6c 75 64 65 64 | can be included| 00001b60 20 69 6e 20 74 68 65 20 63 61 6c 63 75 6c 61 74 | in the calculat| 00001b70 69 6f 6e 20 66 6f 72 6d 75 6c 61 65 20 6f 66 20 |ion formulae of | 00001b80 73 65 6c 66 2d 63 61 6c 63 75 6c 61 74 69 6e 67 |self-calculating| 00001b90 20 66 69 65 6c 64 73 2e 0a 41 6c 6c 20 73 75 63 | fields..All suc| 00001ba0 68 20 66 75 6e 63 74 69 6f 6e 73 20 6d 75 73 74 |h functions must| 00001bb0 20 72 65 74 75 72 6e 20 6f 6e 6c 79 20 74 68 65 | return only the| 00001bc0 69 72 20 70 72 69 6e 63 69 70 61 6c 20 76 61 6c |ir principal val| 00001bd0 75 65 20 2d 20 52 45 54 55 52 4e 20 76 61 72 69 |ue - RETURN vari| 00001be0 61 62 6c 65 73 0a 69 6e 20 74 68 65 20 70 61 72 |ables.in the par| 00001bf0 61 6d 65 74 65 72 20 6c 69 73 74 20 61 72 65 6e |ameter list aren| 00001c00 27 74 20 61 6c 6c 6f 77 65 64 2e 20 54 68 65 20 |'t allowed. The | 00001c10 6e 61 6d 65 20 6f 66 20 65 61 63 68 20 66 75 6e |name of each fun| 00001c20 63 74 69 6f 6e 20 6d 75 73 74 20 62 65 67 69 6e |ction must begin| 00001c30 0a 77 69 74 68 20 61 6e 20 75 70 70 65 72 2d 63 |.with an upper-c| 00001c40 61 73 65 20 27 55 27 2c 20 65 2e 67 2e 20 46 4e |ase 'U', e.g. FN| 00001c50 55 61 76 65 72 61 67 65 2e 20 54 68 69 73 20 69 |Uaverage. This i| 00001c60 73 20 74 6f 20 61 76 6f 69 64 20 64 75 70 6c 69 |s to avoid dupli| 00001c70 63 61 74 69 6f 6e 20 6f 66 0a 66 75 6e 63 74 69 |cation of.functi| 00001c80 6f 6e 20 6e 61 6d 65 73 20 77 68 69 63 68 20 61 |on names which a| 00001c90 6c 72 65 61 64 79 20 61 70 70 65 61 72 20 69 6e |lready appear in| 00001ca0 20 50 6f 77 65 72 62 61 73 65 2e 0a 0a 41 6c 6c | Powerbase...All| 00001cb0 20 74 68 65 20 75 73 65 72 20 66 75 6e 63 74 69 | the user functi| 00001cc0 6f 6e 73 20 74 6f 20 62 65 20 75 73 65 64 20 62 |ons to be used b| 00001cd0 79 20 61 20 64 61 74 61 62 61 73 65 20 6d 75 73 |y a database mus| 00001ce0 74 20 62 65 20 69 6e 63 6c 75 64 65 64 20 69 6e |t be included in| 00001cf0 20 61 20 42 61 73 69 63 0a 70 72 6f 67 72 61 6d | a Basic.program| 00001d00 20 63 61 6c 6c 65 64 20 55 73 65 72 46 75 6e 63 | called UserFunc| 00001d10 73 20 77 68 69 63 68 20 69 73 20 73 74 6f 72 65 |s which is store| 00001d20 64 20 69 6e 20 74 68 65 20 64 61 74 61 62 61 73 |d in the databas| 00001d30 65 20 64 69 72 65 63 74 6f 72 79 20 28 6e 6f 74 |e directory (not| 00001d40 20 69 6e 0a 74 68 65 20 50 6f 77 65 72 62 61 73 | in.the Powerbas| 00001d50 65 20 64 69 72 65 63 74 6f 72 79 29 2e 20 57 68 |e directory). Wh| 00001d60 65 6e 20 74 68 65 20 64 61 74 61 62 61 73 65 20 |en the database | 00001d70 69 73 20 6f 70 65 6e 65 64 20 55 73 65 72 46 75 |is opened UserFu| 00001d80 6e 63 73 20 77 69 6c 6c 20 62 65 0a 6c 6f 61 64 |ncs will be.load| 00001d90 65 64 20 61 73 20 61 20 4c 49 42 52 41 52 59 20 |ed as a LIBRARY | 00001da0 61 6e 64 20 50 6f 77 65 72 62 61 73 65 20 63 61 |and Powerbase ca| 00001db0 6e 20 63 61 6c 6c 20 74 68 65 20 75 73 65 72 20 |n call the user | 00001dc0 66 75 6e 63 74 69 6f 6e 73 20 6a 75 73 74 20 61 |functions just a| 00001dd0 73 0a 72 65 61 64 69 6c 79 20 61 73 20 6f 6e 20 |s.readily as on | 00001de0 69 74 73 20 6f 77 6e 20 66 75 6e 63 74 69 6f 6e |its own function| 00001df0 73 2e 0a 0a 54 68 65 20 64 69 73 74 72 69 62 75 |s...The distribu| 00001e00 74 69 6f 6e 20 64 69 73 63 20 69 6e 63 6c 75 64 |tion disc includ| 00001e10 65 73 20 61 20 55 73 65 72 46 75 6e 63 73 20 66 |es a UserFuncs f| 00001e20 69 6c 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 |ile containing t| 00001e30 77 6f 20 65 78 61 6d 70 6c 65 73 20 6f 66 0a 75 |wo examples of.u| 00001e40 73 65 72 20 66 75 6e 63 74 69 6f 6e 73 20 6b 69 |ser functions ki| 00001e50 6e 64 6c 79 20 73 75 62 6d 69 74 74 65 64 20 62 |ndly submitted b| 00001e60 79 20 44 61 76 69 64 20 4c 65 6e 74 68 61 6c 6c |y David Lenthall| 00001e70 2e 20 55 73 65 72 73 20 61 72 65 20 69 6e 76 69 |. Users are invi| 00001e80 74 65 64 0a 74 6f 20 73 75 62 6d 69 74 20 6f 74 |ted.to submit ot| 00001e90 68 65 72 20 75 73 65 72 20 66 75 6e 63 74 69 6f |her user functio| 00001ea0 6e 73 20 66 6f 72 20 70 6f 73 73 69 62 6c 65 20 |ns for possible | 00001eb0 69 6e 63 6c 75 73 69 6f 6e 20 69 6e 20 74 68 65 |inclusion in the| 00001ec0 20 66 75 6e 63 74 69 6f 6e 0a 6c 69 62 72 61 72 | function.librar| 00001ed0 79 2e 20 46 4e 55 6e 6f 77 20 28 77 68 69 63 68 |y. FNUnow (which| 00001ee0 20 74 61 6b 65 73 20 6e 6f 20 70 61 72 61 6d 65 | takes no parame| 00001ef0 74 65 72 73 29 20 6f 70 65 72 61 74 65 73 20 6f |ters) operates o| 00001f00 6e 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 54 |n the value of T| 00001f10 49 4d 45 24 0a 66 72 6f 6d 20 74 68 65 20 72 65 |IME$.from the re| 00001f20 61 6c 2d 74 69 6d 65 20 63 6c 6f 63 6b 20 61 6e |al-time clock an| 00001f30 64 20 72 65 74 75 72 6e 73 20 61 20 73 74 72 69 |d returns a stri| 00001f40 6e 67 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 |ng containing th| 00001f50 65 20 63 75 72 72 65 6e 74 20 64 61 74 65 20 69 |e current date i| 00001f60 6e 0a 66 6f 72 6d 20 44 44 2d 4d 4d 2d 59 59 2e |n.form DD-MM-YY.| 00001f70 20 41 20 72 65 63 6f 72 64 20 64 65 73 69 67 6e | A record design| 00001f80 20 63 6f 75 6c 64 20 69 6e 63 6c 75 64 65 20 61 | could include a| 00001f90 20 66 69 65 6c 64 20 6f 66 20 27 43 6f 6d 70 6f | field of 'Compo| 00001fa0 73 69 74 65 27 20 74 79 70 65 2c 20 61 74 0a 6c |site' type, at.l| 00001fb0 65 61 73 74 20 65 69 67 68 74 20 63 68 61 72 61 |east eight chara| 00001fc0 63 74 65 72 73 20 6c 6f 6e 67 20 61 6e 64 20 74 |cters long and t| 00001fd0 61 67 67 65 64 20 61 73 2c 20 66 6f 72 20 65 78 |agged as, for ex| 00001fe0 61 6d 70 6c 65 2c 20 44 41 54 45 2e 20 41 73 73 |ample, DATE. Ass| 00001ff0 6f 63 69 61 74 69 6e 67 0a 74 68 65 20 66 69 65 |ociating.the fie| 00002000 6c 64 20 77 69 74 68 20 74 68 65 20 66 6f 72 6d |ld with the form| 00002010 75 6c 61 20 44 41 54 45 3d 46 4e 55 6e 6f 77 20 |ula DATE=FNUnow | 00002020 77 6f 75 6c 64 20 63 61 75 73 65 20 74 68 65 20 |would cause the | 00002030 66 69 65 6c 64 20 74 6f 20 64 69 73 70 6c 61 79 |field to display| 00002040 20 74 68 65 0a 63 75 72 72 65 6e 74 20 64 61 74 | the.current dat| 00002050 65 20 61 74 20 61 6c 6c 20 74 69 6d 65 73 2e 0a |e at all times..| 00002060 0a 54 68 65 20 73 65 63 6f 6e 64 20 66 75 6e 63 |.The second func| 00002070 74 69 6f 6e 2c 20 46 4e 55 61 67 65 69 6e 79 72 |tion, FNUageinyr| 00002080 73 20 61 63 63 65 70 74 73 20 74 77 6f 20 70 61 |s accepts two pa| 00002090 72 61 6d 65 74 65 72 73 2c 20 65 61 63 68 20 6f |rameters, each o| 000020a0 66 20 77 68 69 63 68 0a 73 68 6f 75 6c 64 20 62 |f which.should b| 000020b0 65 20 74 68 65 20 74 61 67 20 6f 66 20 61 20 66 |e the tag of a f| 000020c0 69 65 6c 64 20 77 68 69 63 68 20 68 6f 6c 64 73 |ield which holds| 000020d0 20 61 20 64 61 74 65 20 69 6e 20 44 44 2d 4d 4d | a date in DD-MM| 000020e0 2d 59 59 20 66 6f 72 6d 61 74 2c 20 61 6e 64 0a |-YY format, and.| 000020f0 72 65 74 75 72 6e 73 20 74 68 65 20 64 69 66 66 |returns the diff| 00002100 65 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 74 |erence between t| 00002110 68 65 20 64 61 74 65 73 20 74 6f 20 74 68 65 20 |he dates to the | 00002120 6e 65 61 72 65 73 74 20 79 65 61 72 2e 20 54 68 |nearest year. Th| 00002130 65 20 66 69 72 73 74 20 64 61 74 65 0a 73 68 6f |e first date.sho| 00002140 75 6c 64 20 62 65 20 74 68 65 20 65 61 72 6c 69 |uld be the earli| 00002150 65 72 20 6f 66 20 74 68 65 20 74 77 6f 2e 20 49 |er of the two. I| 00002160 66 20 79 6f 75 72 20 72 65 63 6f 72 64 20 64 65 |f your record de| 00002170 73 69 67 6e 20 68 61 73 20 61 20 66 69 65 6c 64 |sign has a field| 00002180 20 66 6f 72 20 44 61 74 65 0a 6f 66 20 42 69 72 | for Date.of Bir| 00002190 74 68 20 28 6c 65 74 27 73 20 63 61 6c 6c 20 69 |th (let's call i| 000021a0 74 73 20 74 61 67 20 44 4f 42 29 20 79 6f 75 20 |ts tag DOB) you | 000021b0 63 61 6e 20 75 73 65 20 74 68 69 73 20 66 75 6e |can use this fun| 000021c0 63 74 69 6f 6e 20 74 6f 67 65 74 68 65 72 20 77 |ction together w| 000021d0 69 74 68 0a 46 4e 55 6e 6f 77 20 74 6f 20 6d 61 |ith.FNUnow to ma| 000021e0 6b 65 20 61 20 27 43 6f 6d 70 6f 73 69 74 65 27 |ke a 'Composite'| 000021f0 20 66 69 65 6c 64 20 28 41 47 45 29 20 64 69 73 | field (AGE) dis| 00002200 70 6c 61 79 20 61 20 70 65 72 73 6f 6e 27 73 20 |play a person's | 00002210 61 67 65 20 69 6e 20 79 65 61 72 73 20 62 79 0a |age in years by.| 00002220 75 73 69 6e 67 20 74 68 65 20 66 6f 72 6d 75 6c |using the formul| 00002230 61 20 41 47 45 3d 46 4e 55 61 67 65 69 6e 79 72 |a AGE=FNUageinyr| 00002240 73 28 44 4f 42 2c 46 4e 55 6e 6f 77 29 2e 0a 0a |s(DOB,FNUnow)...| 00002250 43 6f 6e 73 69 64 65 72 61 62 6c 65 20 63 61 72 |Considerable car| 00002260 65 20 69 73 20 6e 65 65 64 65 64 20 69 6e 20 63 |e is needed in c| 00002270 6f 6e 73 74 72 75 63 74 69 6e 67 20 75 73 65 72 |onstructing user| 00002280 20 66 75 6e 63 74 69 6f 6e 73 20 73 69 6e 63 65 | functions since| 00002290 20 69 74 20 69 73 20 76 65 72 79 0a 65 61 73 79 | it is very.easy| 000022a0 20 74 6f 20 6d 61 6b 65 20 50 6f 77 65 72 62 61 | to make Powerba| 000022b0 73 65 20 67 65 6e 65 72 61 74 65 20 65 72 72 6f |se generate erro| 000022c0 72 73 2e 20 49 6e 20 70 61 72 74 69 63 75 6c 61 |rs. In particula| 000022d0 72 20 79 6f 75 20 6d 75 73 74 20 61 76 6f 69 64 |r you must avoid| 000022e0 20 67 69 76 69 6e 67 0a 61 20 66 75 6e 63 74 69 | giving.a functi| 000022f0 6f 6e 20 61 20 6e 61 6d 65 20 77 68 69 63 68 20 |on a name which | 00002300 69 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 61 |is the same as a| 00002310 20 66 69 65 6c 64 20 74 61 67 2c 20 6f 72 20 65 | field tag, or e| 00002320 76 65 6e 20 6f 6e 65 20 77 68 69 63 68 0a 63 6f |ven one which.co| 00002330 6e 74 61 69 6e 73 20 61 20 66 69 65 6c 64 20 74 |ntains a field t| 00002340 61 67 20 61 73 20 61 20 73 75 62 73 74 72 69 6e |ag as a substrin| 00002350 67 2e 20 54 68 65 20 74 77 6f 20 66 75 6e 63 74 |g. The two funct| 00002360 69 6f 6e 73 20 64 65 73 63 72 69 62 65 64 20 63 |ions described c| 00002370 6f 75 6c 64 20 6e 6f 74 2c 0a 66 6f 72 20 69 6e |ould not,.for in| 00002380 73 74 61 6e 63 65 2c 20 62 65 20 75 73 65 64 20 |stance, be used | 00002390 69 6e 20 61 20 64 61 74 61 62 61 73 65 20 77 68 |in a database wh| 000023a0 69 63 68 20 68 61 64 20 61 20 66 69 65 6c 64 20 |ich had a field | 000023b0 74 61 67 67 65 64 20 61 73 20 22 6e 6f 77 22 20 |tagged as "now" | 000023c0 6f 72 0a 22 61 67 65 22 2c 20 61 6c 74 68 6f 75 |or."age", althou| 000023d0 67 68 20 22 4e 4f 57 22 20 61 6e 64 20 22 41 47 |gh "NOW" and "AG| 000023e0 45 22 20 63 6f 75 6c 64 20 62 65 20 75 73 65 64 |E" could be used| 000023f0 2e 0a 0a 27 43 61 6c 63 75 6c 61 74 65 64 27 20 |...'Calculated' | 00002400 61 6e 64 20 27 43 6f 6d 70 6f 73 69 74 65 27 20 |and 'Composite' | 00002410 66 69 65 6c 64 73 20 61 72 65 20 6e 6f 72 6d 61 |fields are norma| 00002420 6c 6c 79 20 75 70 64 61 74 65 64 20 77 68 65 6e |lly updated when| 00002430 20 63 68 61 6e 67 65 73 20 61 72 65 0a 6d 61 64 | changes are.mad| 00002440 65 20 74 6f 20 74 68 65 20 66 69 65 6c 64 73 20 |e to the fields | 00002450 77 68 6f 73 65 20 74 61 67 73 20 61 70 70 65 61 |whose tags appea| 00002460 72 20 69 6e 20 74 68 65 69 72 20 63 61 6c 63 75 |r in their calcu| 00002470 6c 61 74 69 6f 6e 20 66 6f 72 6d 75 6c 61 65 2e |lation formulae.| 00002480 20 49 66 20 61 0a 66 6f 72 6d 75 6c 61 20 63 6f | If a.formula co| 00002490 6e 74 61 69 6e 73 20 61 20 75 73 65 72 20 66 75 |ntains a user fu| 000024a0 6e 63 74 69 6f 6e 20 74 68 65 6e 20 74 68 65 20 |nction then the | 000024b0 66 69 65 6c 64 20 77 69 6c 6c 20 62 65 20 75 70 |field will be up| 000024c0 64 61 74 65 64 20 61 66 74 65 72 0a 63 68 61 6e |dated after.chan| 000024d0 67 65 73 20 74 6f 20 74 68 6f 73 65 20 66 69 65 |ges to those fie| 000024e0 6c 64 73 20 77 68 6f 73 65 20 74 61 67 73 20 61 |lds whose tags a| 000024f0 70 70 65 61 72 20 69 6e 20 74 68 65 20 70 61 72 |ppear in the par| 00002500 61 6d 65 74 65 72 20 6c 69 73 74 20 6f 66 20 74 |ameter list of t| 00002510 68 65 0a 66 75 6e 63 74 69 6f 6e 2e 0a 0a 54 68 |he.function...Th| 00002520 65 20 70 72 65 76 69 6f 75 73 20 64 69 73 63 75 |e previous discu| 00002530 73 73 69 6f 6e 20 6f 66 20 27 43 6f 6d 70 6f 73 |ssion of 'Compos| 00002540 69 74 65 27 20 66 69 65 6c 64 73 20 72 65 66 65 |ite' fields refe| 00002550 72 72 65 64 20 74 6f 20 74 68 65 20 66 61 63 74 |rred to the fact| 00002560 20 74 68 61 74 20 74 68 65 79 0a 61 72 65 20 75 | that they.are u| 00002570 70 64 61 74 65 64 20 61 66 74 65 72 20 61 6c 74 |pdated after alt| 00002580 65 72 69 6e 67 20 66 69 65 6c 64 73 20 77 68 6f |ering fields who| 00002590 73 65 20 74 61 67 73 20 61 70 70 65 61 72 20 69 |se tags appear i| 000025a0 6e 20 74 68 65 20 63 61 6c 63 75 6c 61 74 69 6f |n the calculatio| 000025b0 6e 0a 66 6f 72 6d 75 6c 61 20 6f 72 2c 20 69 6e |n.formula or, in| 000025c0 20 74 68 65 20 63 61 73 65 20 6f 66 20 74 68 6f | the case of tho| 000025d0 73 65 20 75 73 69 6e 67 20 54 49 4d 45 24 2c 20 |se using TIME$, | 000025e0 69 6d 6d 65 64 69 61 74 6c 79 20 62 65 66 6f 72 |immediatly befor| 000025f0 65 20 64 69 73 70 6c 61 79 2e 0a 54 68 65 72 65 |e display..There| 00002600 20 69 73 20 61 20 73 6c 69 67 68 74 20 70 72 6f | is a slight pro| 00002610 62 6c 65 6d 20 69 6e 20 74 68 61 74 20 75 73 65 |blem in that use| 00002620 72 20 66 75 6e 63 74 69 6f 6e 73 20 6d 61 79 20 |r functions may | 00002630 75 73 65 20 54 49 4d 45 24 20 77 69 74 68 6f 75 |use TIME$ withou| 00002640 74 20 69 74 0a 61 70 70 65 61 72 69 6e 67 20 69 |t it.appearing i| 00002650 6e 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 20 |n the parameter | 00002660 6c 69 73 74 20 6f 66 20 74 68 65 20 66 75 6e 63 |list of the func| 00002670 74 69 6f 6e 20 2d 20 46 4e 55 6e 6f 77 20 69 73 |tion - FNUnow is| 00002680 20 61 6e 20 65 78 61 6d 70 6c 65 20 6f 66 0a 74 | an example of.t| 00002690 68 69 73 2e 20 54 68 65 20 66 69 65 6c 64 20 41 |his. The field A| 000026a0 47 45 20 69 6e 20 74 68 65 20 65 78 61 6d 70 6c |GE in the exampl| 000026b0 65 20 67 69 76 65 6e 20 61 62 6f 76 65 20 77 69 |e given above wi| 000026c0 6c 6c 20 6f 6e 6c 79 20 62 65 20 75 70 64 61 74 |ll only be updat| 000026d0 65 64 20 77 68 65 6e 20 44 4f 42 0a 69 73 20 65 |ed when DOB.is e| 000026e0 64 69 74 65 64 2e 20 49 6e 20 6f 74 68 65 72 20 |dited. In other | 000026f0 77 6f 72 64 73 20 69 74 20 77 69 6c 6c 20 73 68 |words it will sh| 00002700 6f 77 20 74 68 65 20 70 65 72 73 6f 6e 27 73 20 |ow the person's | 00002710 61 67 65 20 61 74 20 74 68 65 20 74 69 6d 65 20 |age at the time | 00002720 79 6f 75 0a 65 6e 74 65 72 20 68 69 73 2f 68 65 |you.enter his/he| 00002730 72 20 64 61 74 65 20 6f 66 20 62 69 72 74 68 20 |r date of birth | 00002740 62 75 74 20 77 6f 6e 27 74 20 61 75 74 6f 6d 61 |but won't automa| 00002750 74 69 63 61 6c 6c 79 20 63 68 61 6e 67 65 20 69 |tically change i| 00002760 74 20 61 20 79 65 61 72 20 6c 61 74 65 72 2e 0a |t a year later..| 00002770 54 6f 20 6d 61 6b 65 20 74 68 65 20 63 68 61 6e |To make the chan| 00002780 67 65 20 61 75 74 6f 6d 61 74 69 63 20 79 6f 75 |ge automatic you| 00002790 20 63 6f 75 6c 64 20 69 6e 74 72 6f 64 75 63 65 | could introduce| 000027a0 20 54 49 4d 45 24 20 61 73 20 61 20 70 61 72 61 | TIME$ as a para| 000027b0 6d 65 74 65 72 20 69 6e 0a 46 4e 55 6e 6f 77 2c |meter in.FNUnow,| 000027c0 20 69 2e 65 2e 20 6d 61 6b 65 20 69 74 20 46 4e | i.e. make it FN| 000027d0 55 6e 6f 77 28 54 49 4d 45 24 29 20 65 76 65 6e |Unow(TIME$) even| 000027e0 20 74 68 6f 75 67 68 20 74 68 65 20 66 75 6e 63 | though the func| 000027f0 74 69 6f 6e 20 64 6f 65 73 6e 27 74 20 6e 65 65 |tion doesn't nee| 00002800 64 20 69 74 2e 0a 41 73 20 73 6f 6f 6e 20 61 73 |d it..As soon as| 00002810 20 50 6f 77 65 72 62 61 73 65 20 73 65 65 73 20 | Powerbase sees | 00002820 54 49 4d 45 24 20 69 6e 20 74 68 65 20 66 6f 72 |TIME$ in the for| 00002830 6d 75 6c 61 20 69 74 20 77 69 6c 6c 20 75 70 64 |mula it will upd| 00002840 61 74 65 20 41 47 45 2e 20 54 68 65 20 73 61 6d |ate AGE. The sam| 00002850 65 0a 74 72 69 63 6b 20 6f 66 20 69 6e 74 72 6f |e.trick of intro| 00002860 64 75 63 69 6e 67 20 54 49 4d 45 24 20 61 73 20 |ducing TIME$ as | 00002870 61 20 22 64 75 6d 6d 79 22 20 70 61 72 61 6d 65 |a "dummy" parame| 00002880 74 65 72 20 63 61 6e 20 62 65 20 75 73 65 64 20 |ter can be used | 00002890 66 6f 72 20 61 6e 79 20 75 73 65 72 0a 66 75 6e |for any user.fun| 000028a0 63 74 69 6f 6e 20 61 73 73 6f 63 69 61 74 65 64 |ction associated| 000028b0 20 77 69 74 68 20 61 20 66 69 65 6c 64 20 77 68 | with a field wh| 000028c0 69 63 68 20 79 6f 75 20 77 61 6e 74 20 75 70 64 |ich you want upd| 000028d0 61 74 69 6e 67 20 69 6d 6d 65 64 69 61 74 65 6c |ating immediatel| 000028e0 79 2e 0a 0a 27 53 74 61 6d 70 27 20 66 69 65 6c |y...'Stamp' fiel| 000028f0 64 73 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |ds.-------------| 00002900 2d 0a 41 6c 74 68 6f 75 67 68 20 6e 6f 74 20 75 |-.Although not u| 00002910 73 65 64 20 74 6f 20 70 65 72 66 6f 72 6d 20 63 |sed to perform c| 00002920 61 6c 63 75 6c 61 74 69 6f 6e 73 20 6f 72 20 73 |alculations or s| 00002930 74 72 69 6e 67 20 6f 70 65 72 61 74 69 6f 6e 73 |tring operations| 00002940 20 6d 65 6e 74 69 6f 6e 20 77 69 6c 6c 0a 62 65 | mention will.be| 00002950 20 6d 61 64 65 20 68 65 72 65 20 6f 66 20 74 68 | made here of th| 00002960 69 73 20 73 70 65 63 69 61 6c 20 63 6c 61 73 73 |is special class| 00002970 20 6f 66 20 66 69 65 6c 64 20 73 69 6e 63 65 2c | of field since,| 00002980 20 6c 69 6b 65 20 27 43 61 6c 63 75 6c 61 74 65 | like 'Calculate| 00002990 64 27 20 61 6e 64 0a 27 43 6f 6d 70 6f 73 69 74 |d' and.'Composit| 000029a0 65 27 20 66 69 65 6c 64 73 2c 20 74 68 65 79 20 |e' fields, they | 000029b0 61 72 65 20 6e 6f 6e 2d 65 64 69 74 61 62 6c 65 |are non-editable| 000029c0 20 61 6e 64 20 50 6f 77 65 72 62 61 73 65 20 6d | and Powerbase m| 000029d0 61 69 6e 74 61 69 6e 73 20 74 68 65 69 72 0a 63 |aintains their.c| 000029e0 6f 6e 74 65 6e 74 73 20 61 75 74 6f 6d 61 74 69 |ontents automati| 000029f0 63 61 6c 6c 79 20 61 6e 64 20 64 69 73 74 69 6e |cally and distin| 00002a00 67 75 69 73 68 65 73 20 74 68 65 6d 20 62 79 20 |guishes them by | 00002a10 63 68 61 6e 67 69 6e 67 20 74 68 65 20 70 6f 69 |changing the poi| 00002a20 6e 74 65 72 20 74 6f 20 61 0a 22 23 22 20 73 79 |nter to a."#" sy| 00002a30 6d 62 6f 6c 2e 20 54 68 65 20 63 6f 6e 74 65 6e |mbol. The conten| 00002a40 74 73 20 6f 66 20 73 75 63 68 20 61 20 66 69 65 |ts of such a fie| 00002a50 6c 64 20 6d 61 79 20 62 65 20 61 6e 79 20 6f 66 |ld may be any of| 00002a60 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 3a 2d | the following:-| 00002a70 0a 0a 20 20 20 20 20 20 20 20 28 31 29 20 74 68 |.. (1) th| 00002a80 65 20 72 65 63 6f 72 64 20 6e 75 6d 62 65 72 20 |e record number | 00002a90 69 6e 20 74 68 65 20 64 61 74 61 62 61 73 65 20 |in the database | 00002aa0 66 69 6c 65 0a 20 20 20 20 20 20 20 20 28 32 29 |file. (2)| 00002ab0 20 61 20 75 6e 69 71 75 65 20 6e 75 6d 62 65 72 | a unique number| 00002ac0 20 66 6f 72 20 65 61 63 68 20 72 65 63 6f 72 64 | for each record| 00002ad0 20 6f 62 74 61 69 6e 65 64 20 62 79 20 63 6f 75 | obtained by cou| 00002ae0 6e 74 69 6e 67 20 75 70 77 61 72 64 73 0a 20 20 |nting upwards. | 00002af0 20 20 20 20 20 20 20 20 20 20 66 72 6f 6d 20 61 | from a| 00002b00 20 75 73 65 72 2d 73 70 65 63 69 66 69 65 64 20 | user-specified | 00002b10 62 61 73 65 20 76 61 6c 75 65 0a 20 20 20 20 20 |base value. | 00002b20 20 20 20 28 33 29 20 74 68 65 20 74 69 6d 65 20 | (3) the time | 00002b30 6f 66 20 64 61 79 20 77 68 65 6e 20 61 20 72 65 |of day when a re| 00002b40 63 6f 72 64 20 77 61 73 20 66 69 72 73 74 20 65 |cord was first e| 00002b50 6e 74 65 72 65 64 0a 20 20 20 20 20 20 20 20 28 |ntered. (| 00002b60 34 29 20 74 68 65 20 64 61 74 65 20 6f 6e 20 77 |4) the date on w| 00002b70 68 69 63 68 20 61 20 72 65 63 6f 72 64 20 77 61 |hich a record wa| 00002b80 73 20 66 69 72 73 74 20 65 6e 74 65 72 65 64 2e |s first entered.| 00002b90 20 54 68 69 73 20 6d 61 79 20 62 65 20 69 6e 0a | This may be in.| 00002ba0 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 79 20 | any | 00002bb0 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 |of the following| 00002bc0 20 66 6f 72 6d 73 3a 0a 0a 20 20 20 20 20 20 20 | forms:.. | 00002bd0 20 20 20 20 20 20 20 20 20 28 61 29 20 53 75 6e | (a) Sun| 00002be0 2c 30 31 20 41 75 67 20 31 39 39 33 0a 20 20 20 |,01 Aug 1993. | 00002bf0 20 20 20 20 20 20 20 20 20 20 20 20 20 28 62 29 | (b)| 00002c00 20 30 31 2d 30 38 2d 39 33 0a 20 20 20 20 20 20 | 01-08-93. | 00002c10 20 20 20 20 20 20 20 20 20 20 28 63 29 20 30 31 | (c) 01| 00002c20 2d 30 38 2d 31 39 39 33 0a 0a 20 20 20 20 20 20 |-08-1993.. | 00002c30 20 20 28 35 29 20 74 68 65 20 64 61 74 65 20 61 | (5) the date a| 00002c40 6e 64 20 74 69 6d 65 20 61 74 20 77 68 69 63 68 |nd time at which| 00002c50 20 61 20 72 65 63 6f 72 64 20 77 61 73 20 66 69 | a record was fi| 00002c60 72 73 74 20 65 6e 74 65 72 65 64 2e 0a 20 20 20 |rst entered.. | 00002c70 20 20 20 20 20 28 36 29 20 74 68 65 20 64 61 79 | (6) the day| 00002c80 20 6f 6e 20 77 68 69 63 68 20 61 20 72 65 63 6f | on which a reco| 00002c90 72 64 20 77 61 73 20 66 69 72 73 74 20 65 6e 74 |rd was first ent| 00002ca0 65 72 65 64 2e 20 54 68 69 73 20 6d 61 79 20 62 |ered. This may b| 00002cb0 65 20 65 69 74 68 65 72 0a 20 20 20 20 20 20 20 |e either. | 00002cc0 20 20 20 20 20 64 61 79 20 6f 66 20 77 65 65 6b | day of week| 00002cd0 20 28 65 2e 67 2e 20 54 75 65 29 20 6f 72 20 6f | (e.g. Tue) or o| 00002ce0 66 20 6d 6f 6e 74 68 20 28 65 2e 67 2e 20 32 34 |f month (e.g. 24| 00002cf0 29 2e 0a 20 20 20 20 20 20 20 20 28 37 29 20 74 |).. (7) t| 00002d00 68 65 20 6d 6f 6e 74 68 20 69 6e 20 77 68 69 63 |he month in whic| 00002d10 68 20 61 20 72 65 63 6f 72 64 20 77 61 73 20 66 |h a record was f| 00002d20 69 72 73 74 20 65 6e 74 65 72 65 64 2e 20 54 68 |irst entered. Th| 00002d30 69 73 20 6d 61 79 20 62 65 0a 20 20 20 20 20 20 |is may be. | 00002d40 20 20 20 20 20 20 65 69 74 68 65 72 20 61 20 73 | either a s| 00002d50 74 72 69 6e 67 20 28 65 2e 67 2e 20 4f 63 74 29 |tring (e.g. Oct)| 00002d60 20 6f 72 20 61 20 6e 75 6d 62 65 72 20 28 65 2e | or a number (e.| 00002d70 67 2e 20 31 30 29 2e 0a 20 20 20 20 20 20 20 20 |g. 10).. | 00002d80 28 38 29 20 74 68 65 20 79 65 61 72 20 69 6e 20 |(8) the year in | 00002d90 77 68 69 63 68 20 61 20 72 65 63 6f 72 64 20 77 |which a record w| 00002da0 61 73 20 66 69 72 73 74 20 65 6e 74 65 72 65 64 |as first entered| 00002db0 0a 20 20 20 20 20 20 20 20 28 39 29 20 74 68 65 |. (9) the| 00002dc0 20 64 61 74 65 20 61 6e 64 20 74 69 6d 65 20 61 | date and time a| 00002dd0 74 20 77 68 69 63 68 20 61 20 72 65 63 6f 72 64 |t which a record| 00002de0 20 77 61 73 20 6c 61 73 74 20 61 6c 74 65 72 65 | was last altere| 00002df0 64 0a 20 20 20 20 20 20 20 28 31 30 29 20 61 20 |d. (10) a | 00002e00 73 70 72 69 74 65 20 73 75 63 68 20 61 73 20 61 |sprite such as a| 00002e10 20 63 6f 6d 70 61 6e 79 20 6c 6f 67 6f 20 77 68 | company logo wh| 00002e20 69 63 68 20 61 70 70 65 61 72 73 20 6f 6e 20 65 |ich appears on e| 00002e30 76 65 72 79 20 72 65 63 6f 72 64 0a 0a 57 68 65 |very record..Whe| 00002e40 6e 20 63 72 65 61 74 69 6e 67 20 61 20 66 69 65 |n creating a fie| 00002e50 6c 64 20 6f 66 20 74 79 70 65 20 28 32 29 20 79 |ld of type (2) y| 00002e60 6f 75 20 77 69 6c 6c 20 6f 62 73 65 72 76 65 20 |ou will observe | 00002e70 74 68 61 74 20 74 68 65 20 66 69 6c 6c 2d 69 6e |that the fill-in| 00002e80 20 66 69 65 6c 64 0a 6c 61 62 65 6c 6c 65 64 20 | field.labelled | 00002e90 27 4e 75 6d 65 72 69 63 20 6d 69 6e 27 20 62 65 |'Numeric min' be| 00002ea0 63 6f 6d 65 73 20 61 63 74 69 76 65 2e 20 54 68 |comes active. Th| 00002eb0 69 73 20 69 73 20 74 6f 20 61 6c 6c 6f 77 20 79 |is is to allow y| 00002ec0 6f 75 20 74 6f 20 65 6e 74 65 72 20 74 68 65 0a |ou to enter the.| 00002ed0 62 61 73 65 20 61 64 64 72 65 73 73 20 66 6f 72 |base address for| 00002ee0 20 74 68 65 20 73 65 71 75 65 6e 63 65 20 6e 75 | the sequence nu| 00002ef0 6d 62 65 72 2e 20 53 75 70 70 6f 73 65 2c 20 66 |mber. Suppose, f| 00002f00 6f 72 20 65 78 61 6d 70 6c 65 2c 20 79 6f 75 20 |or example, you | 00002f10 77 61 6e 74 20 65 61 63 68 0a 72 65 63 6f 72 64 |want each.record| 00002f20 20 74 6f 20 68 61 76 65 20 61 20 6e 75 6d 62 65 | to have a numbe| 00002f30 72 20 66 72 6f 6d 2c 20 73 61 79 2c 20 34 30 30 |r from, say, 400| 00002f40 30 20 75 70 77 61 72 64 73 20 77 68 69 63 68 20 |0 upwards which | 00002f50 72 65 6d 61 69 6e 73 20 61 74 74 61 63 68 65 64 |remains attached| 00002f60 20 6f 6e 6c 79 0a 74 6f 20 74 68 65 20 72 65 63 | only.to the rec| 00002f70 6f 72 64 20 74 6f 20 77 68 69 63 68 20 69 74 20 |ord to which it | 00002f80 77 61 73 20 6f 72 69 67 69 6e 61 6c 6c 79 20 61 |was originally a| 00002f90 73 73 69 67 6e 65 64 2e 20 54 6f 20 61 63 68 69 |ssigned. To achi| 00002fa0 65 76 65 20 74 68 69 73 20 65 6e 74 65 72 0a 34 |eve this enter.4| 00002fb0 30 30 30 20 69 6e 20 74 68 65 20 27 4e 75 6d 65 |000 in the 'Nume| 00002fc0 72 69 63 20 6d 69 6e 27 20 62 6f 78 20 77 68 65 |ric min' box whe| 00002fd0 6e 20 63 72 65 61 74 69 6e 67 20 74 68 65 20 66 |n creating the f| 00002fe0 69 65 6c 64 2e 20 54 68 65 20 66 69 72 73 74 20 |ield. The first | 00002ff0 72 65 63 6f 72 64 0a 65 6e 74 65 72 65 64 20 69 |record.entered i| 00003000 6e 20 74 68 65 20 6e 65 77 20 64 61 74 61 62 61 |n the new databa| 00003010 73 65 20 77 69 6c 6c 20 74 68 65 6e 20 62 65 20 |se will then be | 00003020 67 69 76 65 6e 20 73 65 71 75 65 6e 63 65 20 6e |given sequence n| 00003030 75 6d 62 65 72 20 34 30 30 30 2c 20 74 68 65 0a |umber 4000, the.| 00003040 6e 65 78 74 20 77 69 6c 6c 20 62 65 20 61 73 73 |next will be ass| 00003050 69 67 6e 65 64 20 34 30 30 31 2e 20 44 65 6c 65 |igned 4001. Dele| 00003060 74 69 6e 67 20 74 68 65 20 73 65 63 6f 6e 64 20 |ting the second | 00003070 72 65 63 6f 72 64 20 61 6e 64 20 69 6e 73 65 72 |record and inser| 00003080 74 69 6e 67 20 61 20 6e 65 77 0a 6f 6e 65 20 67 |ting a new.one g| 00003090 69 76 65 73 20 74 68 65 20 6e 65 77 20 72 65 63 |ives the new rec| 000030a0 6f 72 64 20 74 68 65 20 6e 75 6d 62 65 72 20 34 |ord the number 4| 000030b0 30 30 32 20 61 6e 64 20 6c 65 61 76 65 73 20 74 |002 and leaves t| 000030c0 68 65 20 64 61 74 61 62 61 73 65 20 77 69 74 68 |he database with| 000030d0 6f 75 74 20 61 0a 72 65 63 6f 72 64 20 77 69 74 |out a.record wit| 000030e0 68 20 73 65 71 75 65 6e 63 65 20 6e 75 6d 62 65 |h sequence numbe| 000030f0 72 20 34 30 30 31 2e 20 54 68 75 73 20 74 68 65 |r 4001. Thus the| 00003100 20 63 6f 6e 74 65 6e 74 73 20 6f 66 20 73 75 63 | contents of suc| 00003110 68 20 61 20 66 69 65 6c 64 20 61 6c 77 61 79 73 |h a field always| 00003120 0a 69 6e 64 69 63 61 74 65 20 74 68 65 20 6f 72 |.indicate the or| 00003130 64 65 72 20 69 6e 20 77 68 69 63 68 20 72 65 63 |der in which rec| 00003140 6f 72 64 73 20 77 65 72 65 20 69 6e 69 74 69 61 |ords were initia| 00003150 6c 6c 79 20 65 6e 74 65 72 65 64 2e 0a 0a 46 69 |lly entered...Fi| 00003160 65 6c 64 73 20 77 68 69 63 68 20 64 69 73 70 6c |elds which displ| 00003170 61 79 20 74 68 65 20 72 65 63 6f 72 64 20 6e 75 |ay the record nu| 00003180 6d 62 65 72 20 28 31 29 20 77 69 6c 6c 20 61 6c |mber (1) will al| 00003190 73 6f 20 69 6e 64 69 63 61 74 65 20 74 68 65 20 |so indicate the | 000031a0 6f 72 64 65 72 20 6f 66 0a 65 6e 74 72 79 20 75 |order of.entry u| 000031b0 6e 74 69 6c 20 79 6f 75 20 64 65 6c 65 74 65 20 |ntil you delete | 000031c0 61 20 72 65 63 6f 72 64 20 61 6e 64 20 69 6e 73 |a record and ins| 000031d0 65 72 74 20 61 20 6e 65 77 20 6f 6e 65 2e 20 57 |ert a new one. W| 000031e0 68 65 6e 20 61 20 72 65 63 6f 72 64 20 69 73 0a |hen a record is.| 000031f0 64 65 6c 65 74 65 64 20 28 69 2e 65 2e 20 77 69 |deleted (i.e. wi| 00003200 74 68 20 74 68 65 20 22 64 75 73 74 62 69 6e 22 |th the "dustbin"| 00003210 20 62 75 74 74 6f 6e 2c 20 6e 6f 74 20 6d 65 72 | button, not mer| 00003220 65 6c 79 20 6d 6f 76 65 64 20 74 6f 20 61 6e 6f |ely moved to ano| 00003230 74 68 65 72 0a 73 75 62 66 69 6c 65 29 20 69 74 |ther.subfile) it| 00003240 73 20 72 65 63 6f 72 64 20 6e 75 6d 62 65 72 20 |s record number | 00003250 69 73 20 72 65 6c 65 61 73 65 64 20 61 6e 64 20 |is released and | 00003260 77 69 6c 6c 20 62 65 20 72 65 75 73 65 64 20 62 |will be reused b| 00003270 79 20 74 68 65 20 6e 65 78 74 20 6e 65 77 0a 72 |y the next new.r| 00003280 65 63 6f 72 64 2e 0a 0a 44 69 73 70 6c 61 79 69 |ecord...Displayi| 00003290 6e 67 20 61 20 6c 6f 67 6f 20 6f 6e 20 65 61 63 |ng a logo on eac| 000032a0 68 20 72 65 63 6f 72 64 20 0a 2d 2d 2d 2d 2d 2d |h record .------| 000032b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000032c0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 54 68 65 20 73 |----------.The s| 000032d0 70 72 69 74 65 20 66 6f 72 20 74 68 65 20 6c 6f |prite for the lo| 000032e0 67 6f 20 73 68 6f 75 6c 64 20 68 61 76 65 20 61 |go should have a| 000032f0 20 6e 61 6d 65 20 6e 6f 74 20 6d 6f 72 65 20 74 | name not more t| 00003300 68 61 6e 20 66 6f 75 72 20 6c 65 74 74 65 72 73 |han four letters| 00003310 20 6c 6f 6e 67 0a 61 6e 64 20 73 68 6f 75 6c 64 | long.and should| 00003320 20 62 65 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 | be included in | 00003330 61 20 73 70 72 69 74 65 20 66 69 6c 65 20 63 61 |a sprite file ca| 00003340 6c 6c 65 64 20 27 55 73 72 53 70 72 69 74 65 73 |lled 'UsrSprites| 00003350 27 2e 20 54 68 69 73 20 66 69 6c 65 20 69 73 0a |'. This file is.| 00003360 70 6c 61 63 65 64 20 69 6e 73 69 64 65 20 74 68 |placed inside th| 00003370 65 20 64 61 74 61 62 61 73 65 20 64 69 72 65 63 |e database direc| 00003380 74 6f 72 79 2e 20 57 68 65 6e 20 64 65 73 69 67 |tory. When desig| 00003390 6e 69 6e 67 20 74 68 65 20 73 63 72 65 65 6e 20 |ning the screen | 000033a0 73 65 6c 65 63 74 20 74 68 65 0a 27 4c 6f 67 6f |select the.'Logo| 000033b0 27 20 74 79 70 65 20 66 72 6f 6d 20 74 68 65 20 |' type from the | 000033c0 27 53 74 61 6d 70 27 20 63 6c 61 73 73 20 6f 66 |'Stamp' class of| 000033d0 20 66 69 65 6c 64 73 20 61 6e 64 20 75 73 65 20 | fields and use | 000033e0 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 0a |the name of the.| 000033f0 72 65 71 75 69 72 65 64 20 73 70 72 69 74 65 20 |required sprite | 00003400 61 73 20 74 68 65 20 74 61 67 2e 20 57 68 65 6e |as the tag. When| 00003410 20 74 68 65 20 64 61 74 61 62 61 73 65 20 69 73 | the database is| 00003420 20 69 6e 20 75 73 65 20 74 68 65 20 73 70 72 69 | in use the spri| 00003430 74 65 20 77 69 6c 6c 0a 61 70 70 65 61 72 20 6f |te will.appear o| 00003440 6e 20 65 76 65 72 79 20 72 65 63 6f 72 64 2c 20 |n every record, | 00003450 70 72 6f 76 69 64 65 64 20 74 68 65 20 55 73 72 |provided the Usr| 00003460 53 70 72 69 74 65 73 20 66 69 6c 65 20 69 73 20 |Sprites file is | 00003470 69 6e 20 70 6c 61 63 65 2e 20 49 66 20 6e 6f 74 |in place. If not| 00003480 0a 74 68 65 6e 20 74 68 65 20 66 69 65 6c 64 20 |.then the field | 00003490 77 69 6c 6c 20 61 70 70 65 61 72 20 61 73 20 61 |will appear as a| 000034a0 20 72 65 63 74 61 6e 67 6c 65 20 77 68 69 63 68 | rectangle which| 000034b0 20 69 73 20 65 6d 70 74 79 20 61 70 61 72 74 20 | is empty apart | 000034c0 66 72 6f 6d 20 74 68 65 20 6e 61 6d 65 0a 6f 66 |from the name.of| 000034d0 20 74 68 65 20 6d 69 73 73 69 6e 67 20 73 70 72 | the missing spr| 000034e0 69 74 65 2e 0a 0a 59 6f 75 20 6d 61 79 20 75 73 |ite...You may us| 000034f0 65 20 73 65 76 65 72 61 6c 20 6c 6f 67 6f 73 20 |e several logos | 00003500 6f 6e 20 74 68 65 20 73 63 72 65 65 6e 20 61 74 |on the screen at| 00003510 20 74 68 65 20 73 61 6d 65 20 74 69 6d 65 2e 20 | the same time. | 00003520 41 6c 6c 20 74 68 65 20 73 70 72 69 74 65 73 0a |All the sprites.| 00003530 6d 75 73 74 20 62 65 20 70 72 65 73 65 6e 74 20 |must be present | 00003540 69 6e 20 55 73 72 53 70 72 69 74 65 73 2e 0a 0a |in UsrSprites...| 00003550 41 6c 6c 20 27 53 74 61 6d 70 27 20 66 69 65 6c |All 'Stamp' fiel| 00003560 64 73 20 28 65 78 63 65 70 74 20 27 4c 6f 67 6f |ds (except 'Logo| 00003570 27 29 20 6d 61 79 20 62 65 20 69 6e 63 6c 75 64 |') may be includ| 00003580 65 64 20 69 6e 20 61 20 72 65 70 6f 72 74 2e 20 |ed in a report. | 00003590 54 68 65 79 20 6d 61 79 0a 61 6c 73 6f 20 62 65 |They may.also be| 000035a0 20 69 6e 64 65 78 65 64 2e 0a 0a 43 61 6c 63 75 | indexed...Calcu| 000035b0 6c 61 74 69 6f 6e 73 20 6f 6e 20 61 20 63 6f 6c |lations on a col| 000035c0 75 6d 6e 20 6f 66 20 61 20 72 65 70 6f 72 74 0a |umn of a report.| 000035d0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| * 000035f0 3d 3d 3d 3d 0a 54 68 65 72 65 20 69 73 20 61 6e |====.There is an| 00003600 20 6f 70 74 69 6f 6e 20 6f 6e 20 74 68 65 20 27 | option on the '| 00003610 50 72 69 6e 74 27 20 73 75 62 6d 65 6e 75 20 63 |Print' submenu c| 00003620 61 6c 6c 65 64 20 27 4e 75 6d 65 72 69 63 20 66 |alled 'Numeric f| 00003630 69 65 6c 64 73 27 20 77 68 69 63 68 0a 6c 65 61 |ields' which.lea| 00003640 64 73 20 74 6f 20 61 20 64 69 61 6c 6f 67 75 65 |ds to a dialogue| 00003650 20 62 6f 78 20 6c 69 73 74 69 6e 67 20 61 6c 6c | box listing all| 00003660 20 74 68 65 20 66 69 65 6c 64 73 20 28 69 66 20 | the fields (if | 00003670 61 6e 79 29 20 69 6e 20 74 68 65 20 72 65 63 6f |any) in the reco| 00003680 72 64 20 77 68 69 63 68 0a 61 72 65 20 6f 66 20 |rd which.are of | 00003690 74 79 70 65 20 33 20 28 27 4e 75 6d 62 65 72 27 |type 3 ('Number'| 000036a0 29 20 6f 72 20 36 20 28 27 43 61 6c 63 75 6c 61 |) or 6 ('Calcula| 000036b0 74 65 64 27 29 2e 20 41 73 73 6f 63 69 61 74 65 |ted'). Associate| 000036c0 64 20 77 69 74 68 20 65 61 63 68 20 66 69 65 6c |d with each fiel| 000036d0 64 20 61 72 65 0a 66 6f 75 72 20 63 68 65 63 6b |d are.four check| 000036e0 20 62 6f 78 65 73 20 68 65 61 64 65 64 20 27 43 | boxes headed 'C| 000036f0 6f 75 6e 74 27 2c 20 27 53 75 6d 27 2c 20 27 27 |ount', 'Sum', ''| 00003700 41 76 65 72 61 67 65 27 20 61 6e 64 20 27 53 74 |Average' and 'St| 00003710 61 6e 64 61 72 64 20 64 65 76 69 61 74 69 6f 6e |andard deviation| 00003720 27 2e 0a 54 68 65 73 65 20 62 6f 78 65 73 20 61 |'..These boxes a| 00003730 72 65 20 73 68 61 64 65 64 20 75 6e 74 69 6c 20 |re shaded until | 00003740 61 20 66 69 65 6c 64 20 69 73 20 69 6e 63 6c 75 |a field is inclu| 00003750 64 65 64 20 69 6e 20 61 20 70 72 69 6e 74 20 73 |ded in a print s| 00003760 65 6c 65 63 74 69 6f 6e 2e 20 54 68 65 79 0a 74 |election. They.t| 00003770 68 65 6e 20 62 65 63 6f 6d 65 20 22 6c 69 76 65 |hen become "live| 00003780 22 20 61 6e 64 20 61 6e 79 20 6f 72 20 61 6c 6c |" and any or all| 00003790 20 6f 66 20 74 68 65 6d 20 6d 61 79 20 62 65 20 | of them may be | 000037a0 63 68 6f 73 65 6e 20 62 79 20 63 6c 69 63 6b 69 |chosen by clicki| 000037b0 6e 67 20 77 69 74 68 0a 53 45 4c 45 43 54 2e 20 |ng with.SELECT. | 000037c0 54 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 |The information | 000037d0 72 65 71 75 65 73 74 65 64 20 69 73 20 74 68 65 |requested is the| 000037e0 6e 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 6c |n added to the l| 000037f0 69 73 74 20 66 6f 6f 74 65 72 20 77 68 65 6e 0a |ist footer when.| 00003800 70 72 69 6e 74 69 6e 67 20 74 61 6b 65 73 20 70 |printing takes p| 00003810 6c 61 63 65 2e 0a 0a 0a |lace....| 00003818