Repeatedly Reading the Same Form
fm_rd() can be used together with fm_up() and fm_upd() to repeatedly refresh, read, and process the contents of the same form without removing it from the screen.
If you have an application where the end user will be repeatedly entering new sets of information into the same form, use the following code sequence:
int done = FALSE;
...
|
|
...
|
/* Define form and fields
|
*/
|
...
...
|
/* Set fields to INITIALBLANKS
|
*/
|
fm_up(dfmp);
while(! done)
|
/* Put the form up
|
*/
|
{
|
/* Read the form
|
*/
|
if ((retcode = fm_rd(0, dfmp)) == AC_EXIT)
dtrfr(dfmp); /* Your code to transfer entered data
else if (retcode == AC_QUIT)
done = TRUE;
|
*/
|
}
fm_dn(dfmp);
...
|
|
|