Multiply the value in max_ord_amt by 1.03 and type the new value in the field. To manually increase the maximum order amount 1.
Scroll through the table, checking the Company field of the records for “Ernst Handel.” Programmatically, you could achieve the same results by typing the following Visual FoxPro commands in the Command window USE Customer LOCATE FOR Company = "Ernst Handel" BROWSE After you locate the order for this company, you might want to increase the maximum order amount by 3 percent. Double-click Customer.dbf in the list of files. From the Files of type box, choose Table. To manually find a single order in a table 1. For example, if you wanted to look at information about a single customer in a table of customers, say the Ernst Handel company, you could do it manually by following a specific sequence of instructions. Using Procedures and User-Defined FunctionsĪdvantages of Programming Generally, anything that you can do in a program can also be done manually if you have enough time. The Mechanics of Programming in Visual FoxPro For an explanation of object-oriented programming, see Chapter 3, Object-Oriented Programming. If you are familiar with other programming languages and want to see how Visual FoxPro compares, see Visual FoxPro and Other Programming Languages. If you are new to programming, this chapter helps you get started. At a structural level, programming in Visual FoxPro involves manipulating stored data.
Conceptually, you can think of programming as writing a sequence of instructions for accomplishing specific tasks. Chapter 1: Introduction to Programming In Visual FoxPro, procedural and object-oriented programming work together so you can create powerful, flexible applications.