ACCEPT [< expC >] TO < memvar >
This command allows you to enter character data directly into a memory variable or array element without delimiting the characters with quotation marks.
If you need to perform data validation or trap errors, @ ... GET is a better choice. [Note: This documentation is from FoxPro for DOS 2.6. These are not the better choices in VFP.]
ACCEPT differs from INPUT in two ways. With ACCEPT:
- The data you enter is always treated as character type.
- You don't have to enclose the entered data in quotation marks.
< expc >
The character expression < expC > is the prompt text that is displayed next to the area in which data is entered.
< memvar >
The memory variable or array element in which the character data is stored is specified with < memvar >. If the memory variable or array element isn't defined, it is automatically created by ACCEPT.
If you press Enter without entering data, the memory variable or array element contains the null string. If you press Escape when SET ESCAPE if OFF, the memory varaible contains the null string. If you press Escape when SET ESCAPE is ON, program execution is suspended.
This example prompts you for a customer name and displays the memory variable containing the name you entered.
ACCEPT 'ENTER THE CUSTOMER NAME: ' TO mcustname
@ ... GET, READ, WAIT [http://editoresrhmexico.tumblr.com editoresrhmexico]
Contributors: Barbara Peisch
Category VFP Deprecated Commands Category Reference
( Topic last updated: 2008.08.12 11:58:29 PM )