home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 26.1 Displaying Messages with WHEN
- Author: Greg Lief
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- function main
- memvar name, address, city, getlist
- dbcreate('temp', { { 'name', 'C', 20, 0 } , ;
- { 'address', 'C', 25, 0 } , ;
- { 'city', 'C', 20, 0 } } )
- use temp new
- append blank
- cls
- name := temp->name
- address := temp->address
- city := temp->city
- @ 10,0 get name when fieldhelp(24, 1, "Please enter a name")
- @ 11,0 get address when fieldhelp(24, 1, "Please enter an address")
- @ 12,0 get city when fieldhelp(24, 1, "Please enter a city")
- read
- replace temp->name with name, temp->address with address,;
- temp->city with city
- return nil
-
-
- static function fieldhelp(row, col, msg)
- @ row, col say padr(msg, 50)
- return .t.
-
- // end of file CHP2601.PRG
-