Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 14 NOV 1989 | 2.X | EXPERT | PUSH.SESSION |
PUSH.SESSION is a subroutine that saves the current environment parameters in the variables specified.
PUSH.SESSION(cursor.loc, sentence, record, id, dict, mv)
Use PUSH.SESSION to save the values of certain environment variables:
@SENTENCE @RECORD @ID @DICT @MV @INSERT
as well as the current cursor position and video attributes.
Use cursor.loc to store the current cursor position.
Use sentence to store the current value of @SENTENCE (the most recent TCL sentence).
Use record to store the current value of @RECORD (the current record).
Use id to store the current value of @ID (the current record key).
Use dict to store the current value of @DICT (the dictionary associated with the primary file).
Use mv to store the current value of @MV, @INSERT (see Appendix 1, System Variables), and the current video attributes (delimited by @RM).
PUSH.SESSION passes the current session values described above in the argument list.
/* The following code demonstrates the use of PUSH.SESSION */ DECLARE SUBROUTINE PUSH.SESSION, POP.SESSION, MSG PUSH.SESSION(cursor, sentence, record, id, dict, mv) * Call a subroutine that modifies environment parameters. GOSUB change.environ text = "The modified values are:" text<-1> = "SENTENCE is ":@SENTENCE text<-1> = "RECORD is ":@RECORD text<-1> = "ID is ":@ID MSG(text, "", "", "") POP.SESSION(cursor, sentence, record, id, dict, mv) text = "The restored values are:" text<-1> = "SENTENCE is ":@SENTENCE text<-1> = "RECORD is ":@RECORD text<-1> = "ID is ":@ID MSG(text, "", "", "") STOP /* Assign sample values to system variables referenced by the environment parameters. */ CHANGE.ENVIRON: @@SENTENCE = "SELECT SAMPLE.FILE BY ST BY ZIP" @@RECORD = "SAMPLE" @@ID = "SAMPLE.ID" RETURN