Difference between revisions of "RESTORE GETS"
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Restore saved @…GETS | Restore saved @…GETS | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[@...GET]], [[CLEAR GETS]], [[READ]], [[ | + | [[@...GET]], [[CLEAR GETS]], [[READ]], [[READVAR()]], [[SAVE GETS]] |
==Description== | ==Description== | ||
− | The RESTORE GETS command allows reactivation of @ | + | The RESTORE GETS command allows reactivation of @...GETs previously saved with the SAVE GETS command. The optional FROM <memvar> clause can be used to restore GETS from a memory variable. This allows for multiple SAVE and RESTORE GETS. Since the Recital/4GL allows @...GET commands to be specified within a validation routine, you can execute a screen form in a procedure invoked by the @...GET...VALIDATE command. When the validation procedure is terminated, the READ in the calling screen form is reactivated. This process is called nesting reads. The RESTORE GETS command also restores the value returned by the READVAR() function. |
Line 26: | Line 19: | ||
// Set up validation procedure | // Set up validation procedure | ||
procedure checkit | procedure checkit | ||
− | parameters check | + | parameters check |
− | save screen | + | save screen |
− | // Specify SAVE GETS and CLEAR GETS before @...gets | + | // Specify SAVE GETS and CLEAR GETS before @...gets |
− | save gets | + | save gets |
− | clear gets | + | clear gets |
− | @1,1 get t1 | + | @1,1 get t1 |
− | @3,1 get t3 | + | @3,1 get t3 |
− | read | + | read |
− | // Reactivate reads in main screen form | + | // Reactivate reads in main screen form |
− | restore gets | + | restore gets |
− | restore screen | + | restore screen |
return | return | ||
Line 47: | Line 40: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
+ | [[Category:Screen Forms]] | ||
+ | [[Category:Screen Forms Commands]] |
Latest revision as of 16:15, 12 November 2009
Purpose
Restore saved @…GETS
Syntax
RESTORE GETS [FROM <memvar>]
See Also
@...GET, CLEAR GETS, READ, READVAR(), SAVE GETS
Description
The RESTORE GETS command allows reactivation of @...GETs previously saved with the SAVE GETS command. The optional FROM <memvar> clause can be used to restore GETS from a memory variable. This allows for multiple SAVE and RESTORE GETS. Since the Recital/4GL allows @...GET commands to be specified within a validation routine, you can execute a screen form in a procedure invoked by the @...GET...VALIDATE command. When the validation procedure is terminated, the READ in the calling screen form is reactivated. This process is called nesting reads. The RESTORE GETS command also restores the value returned by the READVAR() function.
Example
// Set up validation procedure procedure checkit parameters check save screen // Specify SAVE GETS and CLEAR GETS before @...gets save gets clear gets @1,1 get t1 @3,1 get t3 read // Reactivate reads in main screen form restore gets restore screen return @1,1 get field1 @2,1 get field2 when field1="g" @3,1 get field3 validate with checkit read
Products
Recital