&@05 @!05"45,01,34,16 Here is our form again...now displayed with the attribute characters we specified and we can begin filling in the fields. Pressing the cursor move keys causes us to jump from field to field. Typing character keys causes data to be entered in the current field. Note the line at the bottom which shows status (this line may be turned off if you prefer). So let's create some records... as usual, I'll do the typing. " !15# Jane Doe{dn}Huge Computers{dn}111 Southwest Northeast St{dn}{dn}{dn}95000{dn} 777-9999{dn} "45,01,34,05 We filled in the blanks. Note that we didn't need to type ^5San Jose^1 or ^5CA^1 since they were default entries. " !07# "45,01,34,21 You may have noticed that it took a while to enter the first two fields. That was because those fields were defined as ^5keyed^1 when the data file was created with ^5Data File Create^1. ^5Keyed^1 fields are useful as your file gets larger, since they save much time during searches and report generation. However, the first time you enter data in record 1 of a keyed field, we must create an index file. After record 1, you probably won't notice any difference between ^5keyed^1 and ^5non-keyed^1 fields (except during searches). " !07# "45,01,34,03 We now press F5 to create the next record... " !05# {F5} "45,01,34,06 A brand new screen with blanks. Note that at the bottom it says Record 2 of 2. We could create up to 32,767 records. " !07# John Doe{dn}Small Computers {dn}2200 Small Street{dn} {dn}{dn}95111{dn}(408) 777-8888{dn} @!05{F5} George Smith{dn}Joes Computers{dn}1900 Happy Street{dn}{dn}{dn}33333{dn} 777-7777{dn} @!05{F5} Able Baker{dn}Breads and Such{dn}333 Yeast Road{dn}{dn}{dn}6666{dn} (408) 773-7777{dn} @!05{F5} Zeti Zimmerman{dn}Zeegers Creepers{dn}777 Haleluya Avenue{dn}{dn}{dn}66666{dn} (415) 999-9999{dn} @!05 "45,01,34,09 Now that we have created 5 records, let me show you the variety of ways there are to ^5search^1 for data. First we can search for a string, ^5anywhere in any field of any record^1. We start by pressing F9. " !07# {F9}@!!!!!!05able "45,01,34,04 We are going to look for the record which contains ^5able^1. " !07#{cr} "45,01,34,05 Note that it was found in record 4, and the cursor is placed in the field it was found in. " !07# "45,01,34,12 We could also limit the search for a string to a ^5single^1 ^5field^1. Yet another way of searching is sequentially stepping through the records. If we place the cursor on a ^5keyed^1 field and press F3, we will find the ^5next^1 record in alphabetic order. F4 will find the ^5previous^1 record. " !10# "45,01,34,06 Allow me to demonstrate. The current field is ^5keyed^1. Each time you hit a key, I will press F3 to find the next record... " !07# {F3}@!03 {F3}@!03 {F3}@!03 {F3} "45,01,34,04 OK. Now we will step backwards by pressing the F4 key... " !07# {F4}@!03 {F4}@!03 {F4}@!03 {F4} "45,01,34,16 You could also find the first record or the last record by pressing the ALT-6 and ALT-7 keys respectively. If the cursor is not on a ^5keyed^1 field and you press F3 or F4, you will be presented with the previous or next record numerically (ie. if you are in record 1 and you press F3, you will go to record 2). " !15# {A1}y "00,01,50,07 That's about all I can show you with such a simple form. We will now progress to a more complex example to demonstrate the math calculation capabilities... While we are here, take a second to look at the main ^5Data File Manager^1 menu options. " !12 1demoz.dat{cr} "45,01,34,08 Take a few moments to study this form. It demonstrates many of the powerful data entry features of ^4Data File^1 ^4Manager^1. Hit a key and I'll get this box out of your way... " !10# @!15 "00,00,44,10 Notice the Date and Time fields were defined as ^4Auto-Date^1 and ^4Auto-Time^1 so they will be updated to current date and time whenever the page is displayed. Also, ^4Data File Manager^1 will make sure you don't enter the wrong data in a field. Look what happens when we type a character in the ^3price^1 field... " !20# {cr}{cr}{cr}{cr}{cr}{cr} {cr}{cr}{cr}{cr}{cr}a "00,01,44,05 That happened because we defined the price field to be ^3numeric only^1. How about if we type a value of 100 in the ^3qty^1 field... " !10# {F0}89.95{le}{le}{le}{le}{le}{le}100{pd} "00,01,44,05 Again, ^4Data File Manager^1 won't let you do that because that field was defined to only allow numbers from 1 to 99... we meant that to be a 10. " !10#{F0}10{cr} "00,00,44,05 Note the bottom status line shows you the Page number and record number. We are on page 1. To see the next page you can press PgDn... " !07#{pd} "45,01,34,03 Pressing PgUp takes us back one page... " !07#{pu} "45,01,34,04 Let's get rid of the bottom status line now so we can see what is behind it... " !05#{F6}@!05 "00,00,79,23 Well that was fun, but the real reason we are here is to show you the way ^4FormManager^1 does calculations. Instead of forcing you to wait until report time to see the results of calculations, ^5Data File Manager^1 works more like a spreadsheet, performing pre-defined calculations when you press F2. You define the calculations to take place with ^3assignment^1 statements, much like you would in a high level language like BASIC or PASCAL. The calculation language was designed to allow general expressions almost everywhere, making it a very powerful tool. We can't begin to describe the full power of the calculation facility, but hopefully a small example will get you started ... Before we begin though, you need to understand what ^3field arrays^1 are. When the current form was created with ^5Forms Editor^1, the Prod. No., Description, Qty, Price, and Total fields were all defined as ^3field^1 ^3arrays^1. That is, each field in a given column has the same name, but a different ^3field index number^1. Line 1 is index number 1, etc. So to refer to line 2 of the field array ^4total^1, we would use the expression ^4total[2]^1. " !20# "00,01,34,11 Consider the current page. We would like ^4Data File^1 ^4Manager^1 to calculate the Total and Amount Due values for us. To do this, we must define 2 equations using the field names (note: if you forgot the field names, you could press ALT-n to get a list of field names). " !10# "00,01,34,04 If you are ready, let's go ahead and edit the formula we want to perform... " !07#{F8} "30,12,49,05 We are now in the Formula Editor. Pressing the up and down arrow keys causes us to jump from line to line. Let's type in a formula to calculate the ^5total^1 column values. " !!10 total[1] = qty[1] * price[1]{dn} "30,12,49,08 This statement will put the value of ^4qty[1]^1 times ^4price[1]^1 into the field ^4total[1]^1. But what about the other 5 lines? Well, we could type the same statement on the next 5 lines and change the numbers, but that seems too boring... that is why the ^5Data File Manager^1 has the ^4$do^1 statment and ^4scratch variables^1. " !!10 "30,12,49,08 The single letters ^4a-z^1 may be used as scratch variables. This is useful for breaking up large expressions (by assigning intermediate values to scratch variables). It is also nice to have scratch variables for the $do statement. " !!10 {up}$do(a, 1, 6): total[a] = qty[a] * price[a]{dn} "30,12,49,08 Note we have now replaced our statement with a $do statement. This says "execute the following statement, assigning the value of '1' to scratch variable ^4a^1 the first time, '2' the second time, ..., and '6' the last time. Thus the value of total[1] through total[6] will be filled. " !!10 "30,12,49,08 We also want to assign a value to the field named ^4due^1. This is easy, since we just want the sum of the ^5field array^1 named total. We use the ^4sum^1 function for this. Note: we could have used a $do statement, but using functions tends to be faster... " !!10 due = sum(total[1..*]);{dn} "30,12,49,09 The ^4total[1..*]^1 is what we call a ^5range^1 specification. This says sum ^5field index numbers^1 1 till the highest that exists for that field name (in this case, 6). OK. We have defined our equations. Let's save the formula file and return to the data entry screen. " !!10 {A1} "00,01,34,05 It won't actually ^3do^1 the calculation until we press the F2 key... ready when you are... " !07#{F2} "00,01,34,05 If you just want to do a quick calculation, you can use the calculator function by pressing the F7 key... " !05#{F7} "00,01,34,06 We can now enter any general expression and the result will be displayed. We can even invoke functions... Here is a simple one... " !!!!!05#33^4+5@!!!!!05{cr} "00,01,34,02 Here is a more complex one... " !!!!!05#((2+3)*max(total[1..*]))@!!!!!05{cr}@!!!!!05 "00,01,34,04 As you can see, it is OK to use functions in calculator mode. " !!!!!05#{cr} "00,00,79,24 The power of the math portion of ^4FormManager^1 can only be light touched here. Refer to Appendix A of the manual for a complete description of its features and use, plus more examples. To summarize the math calculation features:  Enter formulas in scientific notation (not reverse polish)  Built-in variables @crec - current record number @date - current date @time - current time  Scratch variables  $do, $if, $goto, $skip, $error, and $exit statements  General expressions can be used anywhere  Control calculation order with parenthesis  Large number of built-in functions: abs sign trunc round frac mod sqr sqrt exp ln log sin arcsin cos arccos tang arctan max min mean std median sum mult " !20 "00,00,79,24 As you have seen, the ^4Data File Manager^1 is a very powerful interactive tool. Again, we could not describe all the features but we hope you were able to understand how its power could be applied to your needs. Feature Summary:  Data validation and range checking  ^5Fill-in-the-blank^1 data entry  Function keys for current date and time  Auto-date and Auto-time fields  Display-only fields (to be filled by calculations)  Variety of search methods  B-tree field indexing on up to 10 fields  Full function calculator mode  Edit and display formulas  Interactive math calculation  Print field data on pre-printed forms  On-line HELP function " !20 "00,00,79,24 Once you have created some data, ^4Data File Print^1 can be used to print selected fields from each record (for example, mailing list applications). Optional programs to go with ^4FormManager^1 will be available soon. The following is a partial list: ^4FormManager:Report^1  Multiple selection criteria  Sorting on up to 10 fields  Full report formating capabilities ^4FormManager:Utilities^1  BASIC sub-program interface to retrieve field values  Data transfer capability for VisiCalc data files We hope you have enjoyed our demo. If you would like to order ^4FormManager^1, please contact: Alamo Electronic Components, Inc. San Jose, California (408) 578-1490 " !30